https://issues.apache.org/bugzilla/show_bug.cgi?id=46226
Summary: log4j.properties not using the right log level
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: AIX
Status: NEW
Severity: minor
Priority: P2
Component: Configurator
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Hi,
I'm having the following log4j.properties file:
-----
log4j.rootLogger=WARN, General
log4j.appender.General=org.apache.log4j.ConsoleAppender
log4j.appender.General.layout=org.apache.log4j.PatternLayout
log4j.appender.General.layout.ConversionPattern=%d [%-5p] (%F:%L) - %m%n
log4j.appender.General.Threshold=INFO
log4j.appender.Rolling=org.apache.log4j.RollingFileAppender
log4j.appender.Rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.Rolling.layout.ConversionPattern=%d [%-5p] %c - %m%n
log4j.appender.Rolling.File=<PATH_TO_FILE>
log4j.appender.Rolling.MaxFileSize=128KB
log4j.logger.be.roularta.trimspacer.web.tags=ERROR, General
-----
As you can see, everything in be.roularta.trimspacer.web.tags should
be logging for ERROR, but not for DEBUG!
I'm using this code:
-----
package be.roularta.trimspacer.web.tags;
...
public class TrimSpacesTag extends BodyTagSupport {
....
private static final Logger LOGGER =
Logger.getLogger(TrimSpacesTag.class);
....
public int doEndTag() throws JspException {
....
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(bucket+" is true: clearing body");
}
....
-----
But Log4j is still spitting out some debugging for the classes in the
be.roularta.trimspacer.web.tags package.
What did I configure wrong? I tried the mailing list first, but after
subscribing, I was still unable to post some message. I don't think this is a
bug, but a bad configuration at my side
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]