Methods Summary |
---|
public void | addChannel(java.lang.String name, LogHandler logH)
if(name==null) name="";
channels.put( name, logH );
Enumeration enumeration=loggers.keys();
while( enumeration.hasMoreElements() ) {
String k=(String)enumeration.nextElement();
Log l=(Log)loggers.get( k );
if( name.equals( l.getChannel( this ) )) {
l.setProxy( this, logH );
}
}
|
public java.util.Hashtable | getChannels()
return channels;
|
public Log | getLog(java.lang.String channel, java.lang.String prefix, java.lang.Object owner)Default method to create a log facade.
if( prefix==null && owner!=null ) {
String cname = owner.getClass().getName();
prefix = cname.substring( cname.lastIndexOf(".") +1);
}
LogHandler proxy=(LogHandler)channels.get(channel);
if( proxy==null ) proxy=defaultChannel;
// user-level loggers
Log log=new Log( channel, prefix, proxy, owner );
loggers.put( channel + ":" + prefix, log );
if( dL > 0 )
System.out.println("getLog facade " + channel + ":" + prefix);
return log;
|
public java.util.Hashtable | getLoggers()
return loggers;
|
public static void | setDefault(LogHandler l)
if( defaultChannel==null)
defaultChannel=l;
|