[akka-user] Re: Setting akka log level from log4j

2015-08-25 Thread Dennis Jönsson


Den måndag 24 augusti 2015 kl. 18:58:26 UTC+2 skrev Adam:
>
> I've worked around this by starting an actor that polls a regular slf4j 
> logger and then changes the akka log level at run time through the event 
> bus.
>
> It works well enough, although it means selective log levels still incur a 
> high overhead, regardless of logging frequency and it also means that 
> enabling selective debug logs is a bit more cumbersome than what you must 
> be used to.
>
> I can share the code if that sounds like a reasonable solution in your 
> case.
>
> I think another option is using an asynchronous logger, but then if you 
> want to use the data Akka populates in the MDC for akka loggers, you'll 
> have to add it on your own.
>



Thanks Adam, I would be interested in looking at the code. The only 
solution I found sofar has been to run debug log level in AKKA at all times 
and then filter the output through log4j. But that means Akka will have to 
do alot of unnessecary work all the time. 

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Setting akka log level from log4j

2015-08-25 Thread Adam
https://gist.github.com/adamhonen/8863088641df095cce96

Here, I hope that helps.

On Tuesday, August 25, 2015 at 11:52:18 AM UTC+3, Dennis Jönsson wrote:
>
>
>
> Den måndag 24 augusti 2015 kl. 18:58:26 UTC+2 skrev Adam:
>>
>> I've worked around this by starting an actor that polls a regular slf4j 
>> logger and then changes the akka log level at run time through the event 
>> bus.
>>
>> It works well enough, although it means selective log levels still incur 
>> a high overhead, regardless of logging frequency and it also means that 
>> enabling selective debug logs is a bit more cumbersome than what you must 
>> be used to.
>>
>> I can share the code if that sounds like a reasonable solution in your 
>> case.
>>
>> I think another option is using an asynchronous logger, but then if you 
>> want to use the data Akka populates in the MDC for akka loggers, you'll 
>> have to add it on your own.
>>
>
>
>
> Thanks Adam, I would be interested in looking at the code. The only 
> solution I found sofar has been to run debug log level in AKKA at all times 
> and then filter the output through log4j. But that means Akka will have to 
> do alot of unnessecary work all the time. 
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.