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 "Ebersole, Steven" <st...@vignette.com> on 2002/07/01 19:05:54 UTC

RE: html format - display method?

Yes it can output this type of information.  It is called LocationInfo in
log4j.  

It is not tied to the Logger class per se.  It is really a function of the
various layouts (some of which support printing this info, some of which do
not).

PatternLayout does support this through its different options (check the
documentation for that class). 

HTMLLayout does, but requires you to specify that option in the config.  The
option is simply named LocationInfo, so for an appender named A1, do the
following:
log4j.appender.A1.File=/path/to/file
log4j.appender.A1.layout=org.apache.log4j.HTMLLayout
log4j.appender.A1.layout.LocationInfo=true


----------------------------------------------------------------------------
-----------------------------------------

As for the other issue, that should only occur if you are utilizing multiple
JVMs with the same log4j Hierarchy or if you are spawning Thread objects
which are doing logging.





********************************************
Steve Ebersole
IT Integration Engineer
Vignette Corporation 
512.741.4195

Visit http://www.vignette.com

********************************************


-----Original Message-----
From: Robert Mark Bram [mailto:relaxedrob@optushome.com.au]
Sent: Saturday, June 29, 2002 8:28 AM
To: Log4j
Subject: html format - display method?


Howdy all!

The original logger classes had the ability to display the method that
called the logging method. Can log4j still do this?

Rob

:)
:-}
;->


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>