You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Lev0r <An...@itemis.de> on 2008/05/19 12:05:02 UTC

set Location Information

Hi,
I have a tool written in java that checks C-Code for correctness.
I want to produce logging ouput for that with log4j. Is there a way to set
the Location Information like Filename and Linenumber from the Logger??
Thanks for any help,
Andreas

-- 
View this message in context: http://www.nabble.com/set-Location-Information-tp17315171p17315171.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: set Location Information

Posted by Curt Arnold <ca...@apache.org>.
On May 19, 2008, at 5:05 AM, Lev0r wrote:

>
> Hi,
> I have a tool written in java that checks C-Code for correctness.
> I want to produce logging ouput for that with log4j. Is there a way  
> to set
> the Location Information like Filename and Linenumber from the  
> Logger??
> Thanks for any help,
> Andreas
>


There is probably not a simple way to repurpose the LocationInfo that  
is intended to represent the location of the logging request in the  
Java code to instead represent the location in the C code.  However,  
you could use the MDC to represent that information or use an object  
embedding that info as the message parameter.
  
    

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org