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. FYI: https://logging.apache.org/log4j/2.x/manual/layouts.html#LocationInformation What does your configuration look like now? Gary On Wed, Sep 16, 2015 at 5:12 AM, kusmanjali <kushmanj...@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: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> 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