Really init addr and user

master
Daniel Berteaud 9 years ago
parent 38f3083937
commit 5c1b764cf8
  1. 6
      vroom.pl

@ -183,8 +183,10 @@ helper log_event => sub {
$self->get_name, $self->get_name,
$event->{msg} $event->{msg}
); );
my $addr = $self->tx->remote_address || '127.0.0.1'; my $addr = $self->tx->remote_address || '';
my $user = $self->get_name || 'VROOM daemon'; my $user = $self->get_name || '';
$addr = ($addr eq '') ? '127.0.0.1' : $addr;
$user = ($user eq '') ? 'VROOM daemon' : $user;
$self->app->log->info('[' . $addr . '] [' . $user . '] [' . $event->{event} . '] ' . $event->{msg}); $self->app->log->info('[' . $addr . '] [' . $user . '] [' . $event->{event} . '] ' . $event->{msg});
return 1; return 1;
}; };

Loading…
Cancel
Save