Logging has a new additional method

Logging.getLoggerInstance(Class clazz)

this mean that in current and old code its not any more nececary to do this
Logging.getLoggerInstance(MyClassName.class.getName());
but you can just do
Logging.getLoggerInstance(MyClassName.class);

LoggerWrapper
In the mmbase code when using the logger in the code you often see

private static Logger log = Logging.getLoggerInstance(ModuleProbe.class);

but not alway's 
in moost classes that "start mmbase" you see that the logger is only made after 
Logging was initialised

   private static Logger log;
   ......
    public void init() throws ServletException {
        super.init(); // starts mmbase + logging
        log = Logging.getLoggerInstance(BridgeServlet.class);
    }

pre 1.7 this was required.
We now have a loggerWrapper that is returned by Logging.getLoggerInstance
this wrapper makes it possible to configurere logging after the logger was aquired

so now it's possible to use the "conventional" 
        private static Logger log = Logging.getLoggerInstance(BridgeServlet.class);
even in classes that start mmbase


-- 
Kees Jongenburger
Mediapark C101 Hilversum  
+31 (0)35 6772910


Reply via email to