Hello,
   I am used to declaring Loggers in my code the following way
 
private final static Logger logger_m = Logger.getLogger( MyClass.class
);
 
A co worker wants do declare loggers from a base class so that each sub
class has a seperate logger
 
public class BaseClass
{
    private Logger logger_m = Logger.getLogger( MyClass.class );
 
    public Logger createLogger( Object baseObject )
    {
        logger_m = Logger.getLogger(  baseObject.getClass( ) );
    }
    public Logger getLogger( )
    {
        return( logger_m );
    }
}
 
I feel the second approach is to much effort when the first and "normal"
approach if a 1 liner, but i need to know if there are any ramifications
of the second approach?

Reply via email to