|
I can't seem to figure out what is setting the logging level on the 400.
Non 400:
When I execute the following code and no log4j.properties file is
found I get:
log4j:WARN No appenders could be found for logger (logging).
log4j:WARN Please initialize the log4j system properly.
INFO: true
WARN: true
DEBUG: true
TRACE: true
When I execute the following code and there is a log4j.properties
file is found I get:
INFO: false
WARN: true
DEBUG: false
TRACE: false
This is the expected behavior, it reads the log4j.properties and
works as advertised.
On the 400:
It does not matter if I have a log4j.properties file or not, it
always behaves like:
[INFO] logging - -This is an info message
INFO: true
WARN: true
DEBUG: false
TRACE: false
Does the 400 have some built-in logging that it is using ?
-Thanks
Steve More
P.S. Code used:
public class logging {
public static void main(String[] args) throws java.io.IOException {
org.apache.commons.logging.Log log =
org.apache.commons.logging.LogFactory.getLog( "logging" );
log.info( "This is an info message" );
System.out.println( "INFO: " + log.isInfoEnabled() );
System.out.println( "WARN: " + log.isWarnEnabled() );
System.out.println( "DEBUG: " + log.isDebugEnabled() );
System.out.println( "TRACE: " + log.isTraceEnabled() );
}
}
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.