com.lutris.logging
Class StandardLogChannel
java.lang.Object
com.lutris.logging.StandardLogChannel
- All Implemented Interfaces:
- com.lutris.logging.LogChannel
public class StandardLogChannel
- extends java.lang.Object
- implements com.lutris.logging.LogChannel
Standard implementation of a channel associated with a logging
facility. All messages for the facility are written using a channel.
Care is take to avoid synchronization when possible for performance
reasons.
- Author:
- Mark Diekhans
- See Also:
LogChannel
,
StandardLogger
Method Summary |
int |
getLevel(java.lang.String level)
|
com.lutris.logging.LogWriter |
getLogWriter(int level)
|
com.lutris.logging.LogWriter |
getLogWriter(java.lang.String level)
|
boolean |
isEnabled(int level)
|
boolean |
isEnabled(java.lang.String level)
|
void |
write(int level,
java.lang.String msg)
|
void |
write(int level,
java.lang.String msg,
java.lang.Throwable throwable)
|
void |
write(java.lang.String level,
java.lang.String msg)
|
void |
write(java.lang.String level,
java.lang.String msg,
java.lang.Throwable throwable)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StandardLogChannel
protected StandardLogChannel(java.lang.String chanFacility,
StandardLogger loggerObj)
- Construct a new log channel.
- Parameters:
chanFacility
- The facility that the channel is associate with.loggerObj
- The logging object that this channel will be associated
with.
getLevel
public int getLevel(java.lang.String level)
- Specified by:
getLevel
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.getLevel
getLogWriter
public com.lutris.logging.LogWriter getLogWriter(java.lang.String level)
- Specified by:
getLogWriter
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.getLogWriter#String
getLogWriter
public com.lutris.logging.LogWriter getLogWriter(int level)
- Specified by:
getLogWriter
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.getLogWriter#int
isEnabled
public boolean isEnabled(int level)
- Specified by:
isEnabled
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.isEnabled
isEnabled
public boolean isEnabled(java.lang.String level)
- Specified by:
isEnabled
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.isEnabled
write
public void write(int level,
java.lang.String msg)
- Specified by:
write
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.write
write
public void write(java.lang.String level,
java.lang.String msg)
- Specified by:
write
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.write
write
public void write(int level,
java.lang.String msg,
java.lang.Throwable throwable)
- Specified by:
write
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.write
write
public void write(java.lang.String level,
java.lang.String msg,
java.lang.Throwable throwable)
- Specified by:
write
in interface com.lutris.logging.LogChannel
- See Also:
LogChannel.write