logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Source field in NoSQLAppender
Date Wed, 16 Sep 2015 20:25:30 GMT
It sounds like you would need to specify how many stack frames to skip
before coming out of your wrapper class.

This could be done by adding a 'skip' parameter to the 'location'
attribute, like '%location{skip=2}' or something like that.


What does your configuration look like now?


On Wed, Sep 16, 2015 at 5:12 AM, kusmanjali <kushmanjali@gmail.com> wrote:

> We have a wrapper for log4j 2 APIs. So instead of directly calling the
> function we call custom class to do the logging. The problem with this
> aproach is the 'source' field stored in database has details of the custom
> log class and not the class which is calling it i.e all my fileName ,
> linenumber have details of the custom class. Is there a way to update the
> 'source' field?
> --
> with regards
> Kusmanjali Jenamoni

E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message