How to write encrypted (!) lines to logfile ?

2014-12-19 Thread Ben Stover
As far as I know the standard way of writing log output to logfiles is as plain human readable text. Is there a way to configure log4j to enrypt lines before writing? Or (re-)encrypt whole logfile after writing? The encryption should NOT take place IN the writing application but be configured

Re: How to write encrypted (!) lines to logfile ?

2014-12-19 Thread Remko Popma
Interesting! Currently there's no such feature, but would you mind raising a feature request in the log4j2 Jira issue tracker? Thanks! Remko Sent from my iPhone On 2014/12/19, at 19:43, Ben Stover bxsto...@yahoo.co.uk wrote: As far as I know the standard way of writing log output to

Re: How to write encrypted (!) lines to logfile ?

2014-12-19 Thread Gary Gregory
I started going this a while back in the pre 2.0 days but could take the time to finish. The configuration is complicated though. I'll revisit during the holidays... Gary  div Original message /divdivFrom: Remko Popma remko.po...@gmail.com /divdivDate:12/19/2014 06:43

Race condition stopping context

2014-12-19 Thread Mariano Gonzalez
Hello, I have an application in which I'm using all async loggers. When I stop the LoggerContext, there're still some events waiting in disruptor's buffer and when it tries to execute them the context is already closed and thus those events are lost. Is there some kind of hook, callback or

Using markers or ThreadContext to select logger via slf4j

2014-12-19 Thread James Hutton
I have some libraries that leverage slf4j for logging (can't change it) however my application leverages log4j2 and the slf4j-log4j2 bridge. I was wondering if there is a way I can at the beginning of the request flow set a value in the ThreadContext or something so that the slf4j loggers will

Re: Race condition stopping context

2014-12-19 Thread Remko Popma
We used to have this problem in older versions but these issues have been addressed in 2.1 as far as I know. Which version are you using? Sent from my iPhone On 2014/12/19, at 22:01, Mariano Gonzalez mariano.l.gonza...@gmail.com wrote: Hello, I have an application in which I'm using

Re: Race condition stopping context

2014-12-19 Thread Mariano Gonzalez
Hello Remko, I'm using 2.1. Any pointers ? On Fri, Dec 19, 2014 at 11:20 AM, Remko Popma remko.po...@gmail.com wrote: We used to have this problem in older versions but these issues have been addressed in 2.1 as far as I know. Which version are you using? Sent from my iPhone On

Re: Using markers or ThreadContext to select logger via slf4j

2014-12-19 Thread Ralph Goers
What do you mean by “request flow”? You can certainly do this in your code. Ralph On Dec 19, 2014, at 6:10 AM, James Hutton james.a.hut...@gmail.com wrote: I have some libraries that leverage slf4j for logging (can't change it) however my application leverages log4j2 and the slf4j-log4j2

Re: Using markers or ThreadContext to select logger via slf4j

2014-12-19 Thread James Hutton
So for example a cxf interceptor that is using slf4j internally, I'd like to add an interceptor before it to add items to the ThreadContext that would cause getLogger(Class) to return a different logger based upon the value set in the ThreadContext. On Fri, Dec 19, 2014 at 9:55 AM, Ralph Goers

Re: Race condition stopping context

2014-12-19 Thread Mariano Gonzalez
Hello, I've been taking a look at LoggerContext#stop() and for what I see there's code to prevent disruptor to take new messages but there's nothing making sure that the ring buffer is empty before actually closing up. I did a simple test with an Appender wrapper like this: final class