× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.