Re: [Log4j] Appender configuration error

2017-05-04 Thread Mikael Ståldal
Do we have any good example in the code to follow? On Thu, May 4, 2017 at 2:47 AM, Remko Popma wrote: > Yes, if you search for "ignoring" you should find a few other places where > error handling is done similarly. > > (Shameless plug) Every java main() method deserves http://picocli.info > > >

Re: [Log4j] Appender configuration error

2017-05-03 Thread Remko Popma
Yes, if you search for "ignoring" you should find a few other places where error handling is done similarly. (Shameless plug) Every java main() method deserves http://picocli.info > On May 4, 2017, at 5:20, Gary Gregory wrote: > > The problem is that users see an exception in their log and pa

Re: [Log4j] Appender configuration error

2017-05-03 Thread Gary Gregory
The problem is that users see an exception in their log and panic. I've seen this time and time again. Nothing is wrong with the app; the logging or another component is misconfigured is all. The component tells you something is wrong and the app continues normally. Usually. I'm not sure how to ad

Re: [Log4j] Appender configuration error

2017-05-03 Thread Matt Sicker
Exactly what Ralph said. The established pattern we have right now is StatusLogger.error, return null. Who wants their logging framework blowing up their application anyways? ;) On 3 May 2017 at 10:41, Ralph Goers wrote: > Generally, I would log the error to the status logger and then cause the

Re: [Log4j] Appender configuration error

2017-05-03 Thread Ralph Goers
Generally, I would log the error to the status logger and then cause the factory/builder for the component to return null. Ralph > On May 3, 2017, at 7:52 AM, Mikael Ståldal wrote: > > The main problem I have is that I get two ERROR messages for one problem. > > On Wed, May 3, 2017 at 4:50 P

Re: [Log4j] Appender configuration error

2017-05-03 Thread Mikael Ståldal
The main problem I have is that I get two ERROR messages for one problem. On Wed, May 3, 2017 at 4:50 PM, Gary Gregory wrote: > As I am experiencing now in a different stack, too much is better than too > little ;-) > > Are you thinking that the stack traces make it overwhelming? Or the > messag

Re: [Log4j] Appender configuration error

2017-05-03 Thread Gary Gregory
As I am experiencing now in a different stack, too much is better than too little ;-) Are you thinking that the stack traces make it overwhelming? Or the messages not clear enough? Gary On May 3, 2017 3:23 AM, "Mikael Ståldal" wrote: What is an appender supposed to do when it cannot be created

[Log4j] Appender configuration error

2017-05-03 Thread Mikael Ståldal
What is an appender supposed to do when it cannot be created due to the supplied configuration being invalid? I tried to throw IllegalArgumentException and ConfigurationException, but in both cases I get a bit too much error logging: 2017-05-03 12:17:36,757 main ERROR Unable to inject fields into