#71 Loglevel NOTICE not recognised

1.3.0 (final)
open
nobody
None
2
2005-11-21
2004-12-27
No

When specifying the loglevel NOTICE for log4j in the
xins properties file, this value is not properly taken
into account.
Example:
log4j.rootLogger=NOTICE, logfile
will log messages with DEBUG, INFO, WARN and ERROR level.

Changing the setting to
log4j.rootLogger=INFO, logfile
will show INFO, WARN and ERROR level messages.

Discussion

  • Ernst de Haan

    Ernst de Haan - 2004-12-30

    Logged In: YES
    user_id=11053

    I've looked around on the net a bit, on the Log4J site and
    also using Google, but I couldn't find anything so far...

     
  • Ernst de Haan

    Ernst de Haan - 2005-01-08

    Logged In: YES
    user_id=11053

    This bug is still in both XINS 1.0.1 and 1.1.0-alpha8.

    This may go into the 1.0.2 release.

     
  • Ernst de Haan

    Ernst de Haan - 2005-01-13
    • priority: 5 --> 1
     
  • Ernst de Haan

    Ernst de Haan - 2005-01-13

    Logged In: YES
    user_id=11053

    Decreasing priority to 1 because in my opinion this can be
    fixed after 1.1.0-final.

     
  • Anthony Goubard

    Anthony Goubard - 2005-04-21
    • assigned_to: nobody --> agoubard
     
  • Ernst de Haan

    Ernst de Haan - 2005-07-15
    • assigned_to: agoubard --> nobody
     
  • Ernst de Haan

    Ernst de Haan - 2005-11-01
    • priority: 1 --> 2
     
  • Ernst de Haan

    Ernst de Haan - 2005-11-21
    • milestone: --> 1.3.0 (final)
     
  • Ernst de Haan

    Ernst de Haan - 2006-02-06

    Logged In: YES
    user_id=11053

    Did some analysis and found out that Log4J does not support
    custom levels if the PropertyConfigurator is used, unless a
    classname is specified, for example:

    log4j.threshold=NOTICE, class.name

    This is a work-around.

    The relevant code in Log4J, in the Level class, reads as
    follows:

    public
    static
    Level toLevel(String sArg, Level defaultLevel) {
    if(sArg == null)
    return defaultLevel;

    String s = sArg.toUpperCase();

    if(s.equals("ALL")) return Level.ALL;
    if(s.equals("DEBUG")) return Level.DEBUG;
    if(s.equals("INFO")) return Level.INFO;
    if(s.equals("WARN")) return Level.WARN;
    if(s.equals("ERROR")) return Level.ERROR;
    if(s.equals("FATAL")) return Level.FATAL;
    if(s.equals("OFF")) return Level.OFF;
    if(s.equals("TRACE")) return Level.TRACE;
    return defaultLevel;
    }

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks