You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by maggie li <hu...@yahoo.com> on 2003/06/05 20:23:36 UTC

Log taglib on jsp logging - can't log the jsp filename to the outfile

Hello,
I am using jakarta log taglib(log4j) in my JSP page. I have the log4j.properties file set outfile patterlayout as:

log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=[%d{DATE} %-5p] %C{1}:%M( ): - %m%n

if in my jsp page I use direct jakarta Common Log as :

<%
Log log = LogFactory.getLog("this.getClass()");
boolean DEBUG = log.isDebugEnabled();
if(DEBUG)
log.debug("username=" + username);
%>

to get the log object and print out message then the message will print out the jsp compiled name correctly.


[04 Jun 2003 11:52:28,811 DEBUG] billings$jsp:_jspService( ): - username=561896112

But If I use the jakarta log taglib in the jsp as:
<log:debug category="billings$jsp">username=<%=username%></log:debug>

then the output message will display the log tag class name and method no matter what value I set up with the category attribute:

[04 Jun 2003 11:29:59,671 DEBUG] LoggerTag:doAfterBody( ): - username=561896112


Can someone who has experience and knowledge on it help me out of here?
thanks in advance.

Thanks





---------------------------------
Yahoo! Plus - For a better Internet experience