in reply to Re: Why can't I write to a custom log from a Catalyst application on SELinux/CentOS
in thread Why can't I write to a custom log from a Catalyst application on SELinux/CentOS
Hm ... I already mentioned $|
https://perldoc.perl.org/perlvar#$OUTPUT_AUTOFLUSH
Though the documentation says
> forces a flush right away and after every write or print on the currently selected output channel.
so, this means one has to select LOG before using it???°
IO::Handle mentions a method autoflush
BUT from my experience are opened handles per default unbuffered???
Or are they only line-buffered, and the OP forgot the trailing "\n"?
°) and after some digging I found this in the FAQ
{ my $previous_default = select(STDOUT); # save previous default $|++; # autoflush STDOUT select(STDERR); $|++; # autoflush STDERR, to be +sure select($previous_default); # restore previous default }
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why can't I write to a custom log from a Catalyst application on SELinux/CentOS
by LanX (Saint) on Feb 11, 2021 at 17:41 UTC | |
by choroba (Cardinal) on Feb 11, 2021 at 18:01 UTC | |
by LanX (Saint) on Feb 11, 2021 at 18:37 UTC | |
by LanX (Saint) on Feb 12, 2021 at 01:26 UTC | |
by LanX (Saint) on Feb 11, 2021 at 18:30 UTC |