Re: [akka-user] Akka with org.apache.log4j.MDC

2016-01-27 Thread Kamil Korzekwa
Hi Ivan, Thanks for sharing it, I gave it a try. :) I wanted to propagate mdc in akka-http service all the way from the endpoint to actors and futures. Here's my current proof of concept: https://github.com/kamkor/akka-http-mdc-logging-kamon Kamon context and mdc propagation works well to

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-12 Thread bysen128
Thanks Nils, I am planning to use this approach now, but how do you keep context between actors if you are using third party lib actors? I can't modify them to include the context in their messages. class RequestHandler() extends Actor with akka.actor.DiagnosticActorLogging{ override def

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-12 Thread Yann Simon
another alternative is to use http://kamon.io/ Use a trace context instead of MDC, and the trace context is propagated: http://kamon.io/integrations/akka/automatic-trace-context-propagation/ Then, in your log configuration, use converter to access the data you put in the trace context:

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-12 Thread bysen128
Thanks a lot Yann! This is super cool :D. I'm still browsing the documents, would it be possible to use other conversionRule aside from *traceToken* conversionRule conversionWord=traceToken converterClass=kamon.trace.logging.LogbackTraceTokenConverter/ I am planning to put my requestId in

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-12 Thread Ivan Topolnjak
Hello guys! As Yann said, the only Kamon thing that officially can be put in your log patterns is the trace token via the provided converter, but, Kamon has something called TraceLocal Storage which is basically a map where you can put info and retrieve later on wherever you have access to the

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-12 Thread Yann Simon
Le mar. 12 mai 2015 à 12:31, bysen...@gmail.com a écrit : Thanks a lot Yann! This is super cool :D. I'm still browsing the documents, would it be possible to use other conversionRule aside from *traceToken* conversionRule conversionWord=traceToken

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-08 Thread nilsga
I have struggled a lot with the same challenge. The MDC feature of the logging frameworks need a little more manual intervention when operating in an asynchronous runtime like Akka. MDC is tightly coupled to a thread, but communication with and between Actors happen in different threads.

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-05-07 Thread bysen128
Hi √, I want to have MDC logging so I can organize my logs, for example according to requestId. I am tried out the example in http://doc.akka.io/docs/akka/2.3.10/scala/logging.html#MDC_values_defined_by_the_application. It works fine for a single actor, but If I'm sending a message

Re: [akka-user] Akka with org.apache.log4j.MDC

2015-04-27 Thread Viktor Klang
Hi Anindita, It would be great for us to know what is lacking in the MDC sections of the Akka Logging documentation, please don't hesitate to contribute. Thanks! On Mon, Apr 27, 2015 at 8:09 AM, Anindita Ghatak anindita.g...@gmail.com wrote: Hi, How can I use Akka with org.apache.log4j.MDC ?

[akka-user] Akka with org.apache.log4j.MDC

2015-04-27 Thread Anindita Ghatak
Hi, How can I use Akka with org.apache.log4j.MDC ? Thanks Regards, Anindita -- 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