mirror of https://github.com/schoebel/mars
marsadm: preserve flushing order of filehandles
This ensures that warnings appear at the right place when one does not use a redirection like 2>&1 at the commandline.
This commit is contained in:
parent
7ced30b24c
commit
ede65cc694
|
@ -44,12 +44,14 @@ sub llog {
|
|||
|
||||
sub lprint {
|
||||
my ($text) = @_;
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
print $text;
|
||||
llog($text);
|
||||
}
|
||||
|
||||
sub lprint_stderr {
|
||||
my ($text) = @_;
|
||||
$OUTPUT_AUTOFLUSH = 1;
|
||||
print STDERR $text;
|
||||
llog($text);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue