Changes between Version 34 and Version 35 of ProgrammingGuidelines


Ignore:
Timestamp:
07/12/11 16:02:40 (8 years ago)
Author:
welberge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ProgrammingGuidelines

    v34 v35  
    122122It can also capture Logback output in real-time using a socket connection. 
    123123 
     124=== Redirecting input from other loggers === 
     125Input from other loggers (Jakarta Commons Logging, Log4j, java.util.logging) 
     126can be redirected to SLF4J (see http://www.slf4j.org/legacy.html). This is 
     127done by placing the appropriate jars in the classpath. Redirecting java.util.logging 
     128requires a call to 
     129{{{ 
     130SLF4JBridgeHandler.install(); 
     131}}} 
     132This installs SLF4J as an additional logging handler. To get rid of the existing 
     133java.util.logging handlers use: 
     134{{{ 
     135Logger root = Logger.getLogger(""); 
     136for (Handler h:root.getHandlers()) 
     137{ 
     138  root.removeHandler(h); 
     139} 
     140}}} 
     141There is a serious performance impact of redirecting java.util.logging over SLF4J, 
     142a 60 fold increase is reported for disabled logging statements and a 20% over- 
     143head for enabled log statements. So, only use this redirection if the third party 
     144software you want to redirect logs from software which has few log statements 
     145at performance critical places (this holds for odejava). 
     146 
     147 
    124148[[ViewTopic()]] 
    125149!^[[ElckerlycDocumentation]]