EAF 7.4 Implementation

com.lutris.logging
Class MonologLogChannel

java.lang.Object
  extended by com.lutris.logging.MonologLogChannel
All Implemented Interfaces:
com.lutris.logging.LogChannel

public class MonologLogChannel
extends java.lang.Object
implements com.lutris.logging.LogChannel

Monolog 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:
Sinisa Milosevic
See Also:
LogChannel, Log4jLogger

Constructor Summary
protected MonologLogChannel(java.lang.String chanFacility, org.objectweb.util.monolog.api.Logger loggerObj, java.lang.String separator)
          Construct a new log channel.
 
Method Summary
 int getLevel(java.lang.String level)
           
 com.lutris.logging.LogWriter getLogWriter(int level)
          NOT SUPPORTED
 com.lutris.logging.LogWriter getLogWriter(java.lang.String level)
          NOT SUPPORTED
 boolean isEnabled(int level)
          Determine if logging is enabled for the specified level.
 boolean isEnabled(java.lang.String level)
          Determine if logging is enabled for the specified level.
 void write(int level, java.lang.String msg)
          Write a string to the log file.
 void write(int level, java.lang.String msg, java.lang.Throwable throwable)
          Write a string and exception to the log file.
 void write(java.lang.String level, java.lang.String msg)
          Write a string to the log file.
 void write(java.lang.String level, java.lang.String msg, java.lang.Throwable throwable)
          Write a string and exception to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonologLogChannel

protected MonologLogChannel(java.lang.String chanFacility,
                            org.objectweb.util.monolog.api.Logger loggerObj,
                            java.lang.String separator)
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.
Method Detail

getLevel

public int getLevel(java.lang.String level)
Specified by:
getLevel in interface com.lutris.logging.LogChannel

isEnabled

public boolean isEnabled(int level)
Determine if logging is enabled for the specified level.

Specified by:
isEnabled in interface com.lutris.logging.LogChannel

isEnabled

public boolean isEnabled(java.lang.String level)
Determine if logging is enabled for the specified level.

Specified by:
isEnabled in interface com.lutris.logging.LogChannel

write

public void write(int level,
                  java.lang.String msg)
Write a string to the log file.

Specified by:
write in interface com.lutris.logging.LogChannel

write

public void write(int level,
                  java.lang.String msg,
                  java.lang.Throwable throwable)
Write a string and exception to the log file.

Specified by:
write in interface com.lutris.logging.LogChannel

write

public void write(java.lang.String level,
                  java.lang.String msg)
Write a string to the log file.

Specified by:
write in interface com.lutris.logging.LogChannel

write

public void write(java.lang.String level,
                  java.lang.String msg,
                  java.lang.Throwable throwable)
Write a string and exception to the log file.

Specified by:
write in interface com.lutris.logging.LogChannel

getLogWriter

public com.lutris.logging.LogWriter getLogWriter(java.lang.String level)
NOT SUPPORTED

Specified by:
getLogWriter in interface com.lutris.logging.LogChannel
Parameters:
level - Symbolic level that is to be checked.
Returns:
A log writer object.

getLogWriter

public com.lutris.logging.LogWriter getLogWriter(int level)
NOT SUPPORTED

Specified by:
getLogWriter in interface com.lutris.logging.LogChannel
Parameters:
level - Numeric level that is to be checked.
Returns:
A log writer object.

EAF 7.4 Implementation