Richard thanxs for replying. what I ended up is flaging my Logs with the 
help of MDC. 
With this meta info I am very happy in my logs. If I wanted I could even 
add a source line number to MDC but It turned out that with the right MDC 
fields like classname, etc I don't even need this info


Am Montag, 28. September 2015 10:40:05 UTC+2 schrieb Richard Bradley:
>
> Logging the source code location isn't possible in Akka without using 
> macros.
> This old thread discusses how to go about doing that: 
> https://groups.google.com/forum/#!topic/akka-user/-MonmYP6znA
>
> That fix won't be possible in Java, because it doesn't support source code 
> macros. You could write a Java pre-processor to fix this, if it's very 
> important to you.
>
> Good luck,
>
>
> Rich
>
>
> On Friday, September 25, 2015 at 4:00:53 PM UTC+1, [email protected] 
> wrote:
>>
>> sorry for opening up 2 threads.... I guess this is not possible if I am 
>> only  using java?
>>
>> Am Freitag, 25. September 2015 16:58:56 UTC+2 schrieb Patrik Nordwall:
>>>
>>> Perhaps implement your own subclass of LoggingAdapter, and override the 
>>> mdc method?
>>>
>>> On Fri, Sep 25, 2015 at 4:56 PM, <[email protected]> wrote:
>>>
>>>> Patrik thanx for replying.
>>>> If I do not have a actor context because I am in a async code block of 
>>>> a HttpApp... how can I plug into the  DiagnosticLoggingAdapter 
>>>> <http://doc.akka.io/docs/akka/2.4.0-RC3/scala/logging.html#MDC_values_defined_by_the_application>
>>>>  ? 
>>>> Am Freitag, 25. September 2015 16:38:06 UTC+2 schrieb Patrik Nordwall:
>>>>>
>>>>> The Akka logging is asynchronous and that is why you see the line 
>>>>> number of the akka.event.slf4j.Slf4jLogger instead of your own source 
>>>>> code. 
>>>>> It would hurt performance too much to capture line number in the akka 
>>>>> logging in general but one idea of how you could add it yourself is that 
>>>>> you use the DiagnosticLoggingAdapter 
>>>>> <http://doc.akka.io/docs/akka/2.4.0-RC3/scala/logging.html#MDC_values_defined_by_the_application>
>>>>>  
>>>>> and put the source location into MDC.
>>>>>
>>>>> Regards,
>>>>> Patrik
>>>>>
>>>>> On Wed, Sep 23, 2015 at 11:27 AM, <[email protected]> wrote:
>>>>>
>>>>>> my log4j 1.2 ConversionPattern is  [%l] 
>>>>>>
>>>>>>
>>>>>> Am Mittwoch, 23. September 2015 11:10:22 UTC+2 schrieb 
>>>>>> [email protected]:
>>>>>>>
>>>>>>> When using the akka.event.slf4j.Slf4jLogger and log4j  I find for 
>>>>>>> the location something like:
>>>>>>>
>>>>>>>
>>>>>>> "akka.event.slf4j.Slf4jLogger$$anonfun$receive$1$$anonfun$applyOrElse$3.apply$mcV$sp(Slf4jLogger.scala:74)
>>>>>>>
>>>>>>> Is it possible to get the correct Sorce Code Line Number in the logs?
>>>>>>>
>>>>>>> -- 
>>>>>> >>>>>>>>>> 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 [email protected].
>>>>>> To post to this group, send email to [email protected].
>>>>>> Visit this group at http://groups.google.com/group/akka-user.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>>
>>>>> Patrik Nordwall
>>>>> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>>>>> Twitter: @patriknw
>>>>>
>>>>> -- 
>>>> >>>>>>>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> Visit this group at http://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>>
>>> Patrik Nordwall
>>> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
>>> Twitter: @patriknw
>>>
>>>

-- 
>>>>>>>>>>      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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to