3 # ************************************************************
4 # Description : Prints information, warnings and errors.
5 # Author : Chad Elliott
6 # Create Date : 2/02/2004
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
15 # ************************************************************
17 # ************************************************************
19 my $debugtag = 'DEBUG: ';
20 my $infotag = 'INFORMATION: ';
21 my $warntag = 'WARNING: ';
22 my $errortag = 'ERROR: ';
30 # ************************************************************
32 # ************************************************************
36 return bless {}, $class;
44 $debug = ($str =~ /debug\s*=\s*(\d+)/i ?
$1 : 0);
45 $details = ($str =~ /detail(s)?\s*=\s*(\d+)/i ?
$2 : 0);
46 $diagnostic = ($str =~ /diag(nostic)?\s*=\s*(\d+)/i ?
$2 : 0);
47 $information = ($str =~ /info(rmation)?\s*=\s*(\d+)/i ?
$2 : 0);
48 $warnings = ($str =~ /warn(ing)?\s*=\s*(\d+)/i ?
$2 : 0);
53 my($self, $msg, $spc) = @_;
54 $msg =~ s/\.\s+/.\n$spc/g;
61 #my($self, $msg) = @_;
69 #my($self, $msg) = @_;
77 #my($self, $msg) = @_;
78 print "$debugtag$_[1]\n";
85 #my($self, $msg) = @_;
86 print $infotag, $_[0]->split_message($_[1], ' ' x
length($infotag));
93 #my($self, $msg) = @_;
94 print $warntag, $_[0]->split_message($_[1], ' ' x
length($warntag));
100 my($self, $msg, $pre) = @_;
101 print STDERR
'', (defined $pre ?
"$pre\n" : ''), $errortag,
102 $self->split_message($msg, ' ' x
length($errortag));