Skip Menu |

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

Report information
The Basics
Id: 107021
Status: open
Priority: 0/
Queue: Log-Dispatch-Log-Syslog-Fast

People
Owner: Nobody in particular
Requestors: chanwilson [...] gmail.com
Cc:
AdminCc:

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



Subject: Log::Dispatch::Log::Syslog::Fast improvement
Date: Thu, 10 Sep 2015 22:15:19 +0000
To: bug-Log-Dispatch-Log-Syslog-Fast [...] rt.cpan.org
From: Chan Wilson <chanwilson [...] gmail.com>
This is concerning version 1.02. If a syslog server goes down, or is otherwise unreachable, the ->send() call at line 138 fails, and manages to bring the entire code base down. I suggest using Try::Tiny, and wrapping that send() call in a try{} block. thanks, --Chan
Hi, thanks for the report. Silently suppressing the error could lead to invisible message loss. Why can't client code do its own exception handling?
On 2015-09-11 00:14:03, ATHOMASON wrote: Show quoted text
> Hi, thanks for the report. Silently suppressing the error could lead > to invisible message loss. Why can't client code do its own exception > handling?
So are you suggesting that the client protects every $log->... call in an eval or try/catch block? Maybe it would be better if there was an option in the constructor to allow the user to ignore errors, say: ignore_errors => $bool.
To be honest I had forgotten I wrote this package, and you're the first person ever to contact me about it :). So consider the following comments to be from the place of a now very removed user. On Fri Sep 11 02:14:35 2015, SREZIC wrote: Show quoted text
> So are you suggesting that the client protects every $log->... call in > an eval or try/catch block?
Certainly not with explicit code at every callsite, but my usage of this library was wrapped in a logging middleware that eval{}'ed every call and simply logged errors to a separate stream and carried on, so it wasn't an actual problem. Yours and other clients should probably do the same, but... Show quoted text
> Maybe it would be better if there was an > option in the constructor to allow the user to ignore errors, say: > ignore_errors => $bool.
Yours is the only concerned vote, so sure. I'm happy to make you a maintainer, let me know if you'd like to take it over.
Subject: Re: [rt.cpan.org #107021] Log::Dispatch::Log::Syslog::Fast improvement
Date: Fri, 11 Sep 2015 17:10:39 +0000
To: bug-Log-Dispatch-Log-Syslog-Fast [...] rt.cpan.org
From: Chan Wilson <chanwilson [...] gmail.com>
Yes, it's possible to wrap all calls to the logger with try{} blocks (ala Try::Tiny) or eval{}. I have a separate large codebase that resorted to exactly that. It's not what I would call graceful or pretty, especially since it changes the caller depth, so the use of Log4perl to log the calling method needed adjusting. Much more favorable is to catch the error 'at the source', inside LDLSF. The current behavior brings the entire program to a halt, unless one has remembered to try{} the logging... which isn't common practice. An option such as 'ignore_errors' would be an acceptable solution. Adam, if you're willing to have Slaven or myself become the maintainer, that's great. Just let us know. thanks, --Chan On Fri, Sep 11, 2015 at 3:23 AM Adam Thomason via RT < bug-Log-Dispatch-Log-Syslog-Fast@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=107021 > > > To be honest I had forgotten I wrote this package, and you're the first > person ever to contact me about it :). So consider the following comments > to be from the place of a now very removed user. > > On Fri Sep 11 02:14:35 2015, SREZIC wrote:
> > So are you suggesting that the client protects every $log->... call in > > an eval or try/catch block?
> > Certainly not with explicit code at every callsite, but my usage of this > library was wrapped in a logging middleware that eval{}'ed every call and > simply logged errors to a separate stream and carried on, so it wasn't an > actual problem. Yours and other clients should probably do the same, but... >
> > Maybe it would be better if there was an > > option in the constructor to allow the user to ignore errors, say: > > ignore_errors => $bool.
> > Yours is the only concerned vote, so sure. I'm happy to make you a > maintainer, let me know if you'd like to take it over. >
Ok, I've added SREZIC as a maintainer. Please just keep the existing default behavior for the sake of darkpan clients. On Fri Sep 11 13:11:07 2015, chanwilson@gmail.com wrote: Show quoted text
> Yes, it's possible to wrap all calls to the logger with try{} blocks > (ala > Try::Tiny) or eval{}. I have a separate large codebase that resorted > to > exactly that. It's not what I would call graceful or pretty, > especially > since it changes the caller depth, so the use of Log4perl to log the > calling method needed adjusting. > > Much more favorable is to catch the error 'at the source', inside > LDLSF. > The current behavior brings the entire program to a halt, unless one > has > remembered to try{} the logging... which isn't common practice. > > An option such as 'ignore_errors' would be an acceptable solution. > > Adam, if you're willing to have Slaven or myself become the > maintainer, > that's great. Just let us know. > > thanks, > > --Chan > > > On Fri, Sep 11, 2015 at 3:23 AM Adam Thomason via RT < > bug-Log-Dispatch-Log-Syslog-Fast@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=107021 > > > > > To be honest I had forgotten I wrote this package, and you're the > > first > > person ever to contact me about it :). So consider the following > > comments > > to be from the place of a now very removed user. > > > > On Fri Sep 11 02:14:35 2015, SREZIC wrote:
> > > So are you suggesting that the client protects every $log->... call > > > in > > > an eval or try/catch block?
> > > > Certainly not with explicit code at every callsite, but my usage of > > this > > library was wrapped in a logging middleware that eval{}'ed every call > > and > > simply logged errors to a separate stream and carried on, so it > > wasn't an > > actual problem. Yours and other clients should probably do the same, > > but... > >
> > > Maybe it would be better if there was an > > > option in the constructor to allow the user to ignore errors, say: > > > ignore_errors => $bool.
> > > > Yours is the only concerned vote, so sure. I'm happy to make you a > > maintainer, let me know if you'd like to take it over. > >