You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ju Ar <ja...@yahoo.com> on 2005/11/17 17:35:52 UTC

Problem with TRACE level

Threre seems to be a problem when using Logger.trace("") on some pattern conversion characters in opposite to Logger.log(Level.TRACE, "") which works correctly.
  Those caracters seem to be all location collecting parameters like C, M, L.(I know that they are using a lot of CPU time ... )
   
  This is the code to reproduce: 
   
  definition of the logger
   
      public static Logger cat = Logger.getLogger(TestLogging.class);
   
  Initialization:
   
      PatternLayout layout = new PatternLayout( "%d{ISO8601} %-5p [%t] %-12.12C | %-12.12M  (%5.5L) | %m %n" );
    ConsoleAppender consoleAppender = new ConsoleAppender( layout );
    cat.setLevel(Level.ALL );
    cat.addAppender( consoleAppender );
   
  Using it:
  
    cat.fatal("FATAL");
    cat.trace("TRACE_1"); 
    cat.log(Level.TRACE , "TRACE_2");
   
  And here is the output. The second line shows the issue that C, M, L are not working.
   
      2005-11-17 14:54:23,944 FATAL [main] TestLogging  | main          (   24) | FATAL 
    2005-11-17 14:54:23,964 TRACE [main] ?            | ?             (    ?) | TRACE_1 
    2005-11-17 14:54:23,964 TRACE [main] TestLogging  | main          (   26) | TRACE_2 
   
  Any hints?
  Thanks
  Ju

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  

Re: Problem with TRACE level

Posted by Curt Arnold <ca...@apache.org>.
On Nov 17, 2005, at 10:35 AM, Ju Ar wrote:

> Threre seems to be a problem when using Logger.trace("") on some  
> pattern conversion characters in opposite to Logger.log 
> (Level.TRACE, "") which works correctly.
>

See http://issues.apache.org/bugzilla/show_bug.cgi?id=36800.  The  
problem should be fixed in the SVN HEAD and the forthcoming 1.2.13.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org