mirror of
https://github.com/schoebel/mars
synced 2024-12-12 18:01:21 +00:00
marsadm: use stderr for errors and warnings
This commit is contained in:
parent
f9ea0132f3
commit
2b71a212de
@ -22,16 +22,24 @@ sub lprint {
|
||||
}
|
||||
}
|
||||
|
||||
sub lprint_stderr {
|
||||
my ($text) = @_;
|
||||
print STDERR $text;
|
||||
if ($notify) {
|
||||
system("/usr/bin/logger -t marsadm \"$notify $text\"");
|
||||
}
|
||||
}
|
||||
|
||||
sub ldie {
|
||||
my ($text) = @_;
|
||||
$error_count++;
|
||||
lprint "DYING: $text";
|
||||
lprint_stderr "DYING: $text";
|
||||
die "\n";
|
||||
}
|
||||
|
||||
sub lwarn {
|
||||
my ($text) = @_;
|
||||
lprint "WARNING: $text";
|
||||
lprint_stderr "WARNING: $text";
|
||||
}
|
||||
|
||||
##################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user