Re: Hide message in throwable

2019-05-24 Thread Gaurav
On 2019/05/24 12:11:19, Apache wrote: > The code you highlight is there to include the throwable converter if one is > not specified. If you add your own throwable converter then handlesThrowable > will be true and that code won’t be run. > > You can also hide the exception with %noex. > >

Re: Hide message in throwable

2019-05-24 Thread Gaurav
On 2019/05/24 11:14:25, Gaurav wrote: > > > On 2019/05/22 15:36:11, "Carter Kozak" wrote: > > Once you've implemented a LogEventPatternConverter which overrides > > "handlesThrowable" to return true, you will also need to use that pattern > > in the PatternLayout pattern. This can be a l

Re: Hide message in throwable

2019-05-24 Thread Apache
The code you highlight is there to include the throwable converter if one is not specified. If you add your own throwable converter then handlesThrowable will be true and that code won’t be run. You can also hide the exception with %noex. Under what circumstances do you want to hide the excepti

Re: Hide message in throwable

2019-05-24 Thread Gaurav
On 2019/05/22 15:36:11, "Carter Kozak" wrote: > Once you've implemented a LogEventPatternConverter which overrides > "handlesThrowable" to return true, you will also need to use that pattern in > the PatternLayout pattern. This can be a little bit confusing since the > pattern layout will a

Re: Hide message in throwable

2019-05-24 Thread Gaurav
On 2019/05/22 17:47:56, Ralph Goers wrote: > PatternLayout isn’t really designed to use an alternate implementation of > PatternParser. Why do you need one? A custom Layout wouldn’t normally use a > PatternParser, only PatternLayout and you shouldn’t need to modify that > either. > > Just

Re: Hide message in throwable

2019-05-22 Thread Ralph Goers
PatternLayout isn’t really designed to use an alternate implementation of PatternParser. Why do you need one? A custom Layout wouldn’t normally use a PatternParser, only PatternLayout and you shouldn’t need to modify that either. Just create a new PatternConverter that does what you need it to d

Re: Hide message in throwable

2019-05-22 Thread Carter Kozak
Once you've implemented a LogEventPatternConverter which overrides "handlesThrowable" to return true, you will also need to use that pattern in the PatternLayout pattern. This can be a little bit confusing since the pattern layout will automatically add a default throwable pattern converter to t

Re: Hide message in throwable

2019-05-22 Thread Matt Sicker
Did you include the @ConverterKeys annotation on your converters? You shouldn't need to make a new layout I think. On Wed, 22 May 2019 at 06:18, Gaurav wrote: > > > > On 2019/05/16 14:59:56, Matt Sicker wrote: > > Instead of extending the plugin classes, you can create your own > > plugins. Patt

Re: Hide message in throwable

2019-05-22 Thread Gaurav
On 2019/05/16 14:59:56, Matt Sicker wrote: > Instead of extending the plugin classes, you can create your own > plugins. PatternConverters are relatively trivial plugins, so I > wouldn't worry too much about code duplication. > > I could be missing a feature, though. > > On Thu, 16 May 2019

Re: Hide message in throwable

2019-05-16 Thread Matt Sicker
Instead of extending the plugin classes, you can create your own plugins. PatternConverters are relatively trivial plugins, so I wouldn't worry too much about code duplication. I could be missing a feature, though. On Thu, 16 May 2019 at 09:32, Gaurav wrote: > > Hi, > > I want to hide the messag

Hide message in throwable

2019-05-16 Thread Gaurav
Hi, I want to hide the message in the throwable. What I've tried - 1. Create a custom layout by extending AbstractStringLayout. 2. Create a pattern parser. 3. Create a pattern converter by extending ThrowablePatternConverter. Is there a simpler way to do this? In log4j1.2, it was simple to jus