Skip Menu |

This queue is for tickets about the Mojo-Log-Syslog CPAN distribution.

Report information
The Basics
Id: 130603
Status: resolved
Priority: 0/
Queue: Mojo-Log-Syslog

People
Owner: Nobody in particular
Requestors: sch [...] chaos.dk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.01



Subject: WARN and ERROR translates to wrong syslog levels
Date: Tue, 1 Oct 2019 15:09:41 +0200
To: bug-Mojo-Log-Syslog [...] rt.cpan.org
From: Søren Schrøder <sch [...] chaos.dk>
$log->warn("warn mojo lite"); $log->error("error mojo lite"); error: syslog: invalid level/facility: LOG_WARN at /usr/local/share/perl/5.24.1/Mojo/Log/Syslog.pm line 40. FIX: $ git diff Syslog.pm diff --git a/lib/Mojo/Log/Syslog.pm b/lib/Mojo/Log/Syslog.pm index 4582037..e4b3afc 100644 --- a/lib/Mojo/Log/Syslog.pm +++ b/lib/Mojo/Log/Syslog.pm @@ -24,9 +24,9 @@ sub new { } sub debug { shift->_syslog(debug => LOG_DEBUG => @_) } -sub warn { shift->_syslog(warn => LOG_WARN => @_) } +sub warn { shift->_syslog(warn => LOG_WARNING => @_) } sub info { shift->_syslog(info => LOG_INFO => @_) } -sub error { shift->_syslog(error => LOG_ERROR => @_) } +sub error { shift->_syslog(error => LOG_CRIT => @_) } sub fatal { shift->_syslog(fatal => LOG_CRIT => @_) } sub _syslog { -- Søren Schrøder. Obey Gravity - It's the law !
Thanks for your report! I have uploaded version 1.01 that fixes it (but I have translated error to LOG_ERR, instead of LOG_CRIT, which servers a completely different purpose).
On Tue Oct 01 09:10:15 2019, sch@chaos.dk wrote: Show quoted text
> $log->warn("warn mojo lite"); > $log->error("error mojo lite"); > > error: > > syslog: invalid level/facility: LOG_WARN at > /usr/local/share/perl/5.24.1/Mojo/Log/Syslog.pm line 40. > > FIX: > > $ git diff Syslog.pm > diff --git a/lib/Mojo/Log/Syslog.pm b/lib/Mojo/Log/Syslog.pm > index 4582037..e4b3afc 100644 > --- a/lib/Mojo/Log/Syslog.pm > +++ b/lib/Mojo/Log/Syslog.pm > @@ -24,9 +24,9 @@ sub new { > } > > sub debug { shift->_syslog(debug => LOG_DEBUG => @_) } > -sub warn { shift->_syslog(warn => LOG_WARN => @_) } > +sub warn { shift->_syslog(warn => LOG_WARNING => @_) } > sub info { shift->_syslog(info => LOG_INFO => @_) } > -sub error { shift->_syslog(error => LOG_ERROR => @_) } > +sub error { shift->_syslog(error => LOG_CRIT => @_) } > sub fatal { shift->_syslog(fatal => LOG_CRIT => @_) } > > sub _syslog { >