ch.qos.logback.classic.pattern
Class ClassicConverter

java.lang.Object
  extended by ch.qos.logback.core.pattern.Converter<E>
      extended by ch.qos.logback.core.pattern.FormattingConverter<E>
          extended by ch.qos.logback.core.pattern.DynamicConverter<ILoggingEvent>
              extended by ch.qos.logback.classic.pattern.ClassicConverter
All Implemented Interfaces:
LoggerContextAware, ContextAware, LifeCycle
Direct Known Subclasses:
CallerDataConverter, ContextNameConverter, DateConverter, FileOfCallerConverter, LevelConverter, LineOfCallerConverter, LineSeparatorConverter, MarkerConverter, MDCConverter, MessageConverter, MethodOfCallerConverter, NamedConverter, PropertyConverter, RelativeTimeConverter, SyslogStartConverter, ThreadConverter, ThrowableHandlingConverter

public abstract class ClassicConverter
extends DynamicConverter<ILoggingEvent>
implements LoggerContextAware

This class serves the super-class of all converters in logback. It extends DynamicConverter and also implements LoggerContextAware.

Author:
Ceki Gulcu

Constructor Summary
ClassicConverter()
           
 
Method Summary
 void addError(String msg)
           
 void addError(String msg, Throwable ex)
           
 void addInfo(String msg)
           
 void addInfo(String msg, Throwable ex)
           
 void addStatus(Status status)
           
 void addWarn(String msg)
           
 void addWarn(String msg, Throwable ex)
           
 Context getContext()
           
 void setContext(Context context)
           
 void setLoggerContext(LoggerContext lc)
          Set owning logger context for this component.
 
Methods inherited from class ch.qos.logback.core.pattern.DynamicConverter
getFirstOption, getOptionList, isStarted, setOptionList, start, stop
 
Methods inherited from class ch.qos.logback.core.pattern.FormattingConverter
getFormattingInfo, setFormattingInfo, write
 
Methods inherited from class ch.qos.logback.core.pattern.Converter
convert, getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassicConverter

public ClassicConverter()
Method Detail

setLoggerContext

public void setLoggerContext(LoggerContext lc)
Description copied from interface: LoggerContextAware
Set owning logger context for this component. This operation can only be performed once. Once set, the owning context cannot be changed.

Specified by:
setLoggerContext in interface LoggerContextAware
Parameters:
lc - The context where this component is attached.

setContext

public void setContext(Context context)
Specified by:
setContext in interface ContextAware

getContext

public Context getContext()
Specified by:
getContext in interface ContextAware

addStatus

public void addStatus(Status status)
Specified by:
addStatus in interface ContextAware

addInfo

public void addInfo(String msg)
Specified by:
addInfo in interface ContextAware

addInfo

public void addInfo(String msg,
                    Throwable ex)
Specified by:
addInfo in interface ContextAware

addWarn

public void addWarn(String msg)
Specified by:
addWarn in interface ContextAware

addWarn

public void addWarn(String msg,
                    Throwable ex)
Specified by:
addWarn in interface ContextAware

addError

public void addError(String msg)
Specified by:
addError in interface ContextAware

addError

public void addError(String msg,
                     Throwable ex)
Specified by:
addError in interface ContextAware


Copyright © 2005-2010 QOS.ch. All Rights Reserved.