Add date and PID to default stderr logger

When using Apache or docker, the default Std logger does not write a
timestamp.

This format (poorly) imitates the error_log format so that LLNG messages
will stand out a little less in apache logs. And so that our docker
users can have timestamped messages
environments/ppa-mbqj77/deployments/742
Maxime Besson 6 years ago
parent 2f9c7b787e
commit 3a8b6da81a
  1. 2
      lemonldap-ng-common/lib/Lemonldap/NG/Common/Logger/Std.pm

@ -10,7 +10,7 @@ sub new {
my $show = 1;
foreach (qw(error warn notice info debug)) {
if ($show) {
eval qq'sub $_ {print STDERR "[$_] \$_[1]\n"}';
eval qq'sub $_ {print STDERR "[".localtime."] [LLNG:\$\$] [$_] \$_[1]\n"}';
}
else {
eval qq'sub $_ {1}';

Loading…
Cancel
Save