commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijay shanker <vijay.s...@gmail.com>
Subject how to change log label at the run time
Date Fri, 11 Dec 2009 06:07:32 GMT
Hi all

I am using commons-logging with aspectj.

Once I created a log object by below code

--------
private Log log = LogFactory.getLog(LoggingAspect.class);
--------

When i print log with this object; i get output like

--------
2009-12-11 11:31:41,558 INFO  [LoggingAspect] com.stpl.pocs.logs.BaseService
: Entering method getName.
2009-12-11 11:31:41,558 INFO  [LoggingAspect] com.stpl.pocs.logs.BaseService
: Exiting method getName.
--------

Is there any way I can change the " [LoggingAspect]" to the class name
 "com.stpl.pocs.logs.BaseService".

So this is requirement I presume is to change log label dynamically.

Please suggest.

Regards,
Vijay Shanker Dubey

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