I'm new to both liferay and sl4j, and out of practice with log4j.
I'm having a configuration problem.
Here's the meat of my portal-log4j.xml
<appender name="GLOBALCONSOL" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.EnhancedPatternLayout">
<param name="ConversionPattern" value="%d{HH:mm:ss} %C %M %L :::: %m%n "/>
</layout>
</appender>
so
%C = fully qualified class name
%M = method name
%L = line number
:::: = some characters to make sure I'm looking at the correct line in my log
%m%n = the message and new line char.
In my class I declare the logger
private final static Logger log = LoggerFactory.getLogger(SystemUserBean.class);
Later I use it
log.debug("in user Search");
This is what comes out in the console
08:33:05 com.liferay.util.sl4fj.LiferayLoggerAdapter debug 39 :::: in user Search
08:33:05,154 DEBUG [[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'][SystemUserBean:39] in user Search
So the first line is everything I expect except it's for the wrong class, the second line is from....I have no idea, but I'd like to suppress it.
Both log lines show the incorrect line number, it's the line number in the LiferayLoggerAdapter where the message is being sent to the log
@Override
public void debug(String message) {
_log.debug(message); //this is line 39 in com.liferay.util.sl4fj.LiferayLoggerAdapter
}
I've searched for the problem but I can't seem to find the relevant documentation or anyone else who had this problem.
Any help would be appreciated.
Thanks