Package org.openas2.logging
Class BaseLogger
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.logging.BaseLogger
-
- Direct Known Subclasses:
ConsoleLogger,EmailLogger,FileLogger,SentryLogger,SocketLogger
public abstract class BaseLogger extends BaseComponent implements Logger
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_EXCEPTIONSstatic java.lang.StringPARAM_SHOWstatic java.lang.StringVALUE_SHOW_ALLstatic java.lang.StringVALUE_SHOW_EXCEPTIONSstatic java.lang.StringVALUE_SHOW_INFOstatic java.lang.StringVALUE_SHOW_TERMINATED
-
Constructor Summary
Constructors Constructor Description BaseLogger()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voiddoLog(java.lang.Throwable throwable, boolean terminated)protected abstract voiddoLog(Level level, java.lang.String msgText, Message message)FormattergetFormatter()protected abstract java.lang.StringgetShowDefaults()voidinit(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)Component lifecycle hook.booleanisLogExceptionTrace()protected booleanisLogging(OpenAS2Exception exception)protected booleanisShowing(java.lang.String value)voidlog(java.lang.Throwable t, Level level, boolean terminated)voidlog(Level level, java.lang.String msgText, Message message, java.lang.Throwable t)level msgText messagevoidsetFormatter(Formatter formatter)voidsetLogExceptionTrace(boolean logExceptionTrace)-
Methods inherited from class org.openas2.BaseComponent
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openas2.Component
destroy, getName, getParameters, getSession
-
-
-
-
Field Detail
-
PARAM_EXCEPTIONS
public static final java.lang.String PARAM_EXCEPTIONS
- See Also:
- Constant Field Values
-
PARAM_SHOW
public static final java.lang.String PARAM_SHOW
- See Also:
- Constant Field Values
-
VALUE_SHOW_ALL
public static final java.lang.String VALUE_SHOW_ALL
- See Also:
- Constant Field Values
-
VALUE_SHOW_TERMINATED
public static final java.lang.String VALUE_SHOW_TERMINATED
- See Also:
- Constant Field Values
-
VALUE_SHOW_EXCEPTIONS
public static final java.lang.String VALUE_SHOW_EXCEPTIONS
- See Also:
- Constant Field Values
-
VALUE_SHOW_INFO
public static final java.lang.String VALUE_SHOW_INFO
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:ComponentComponent lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
initin interfaceComponent- Overrides:
initin classBaseComponent- Parameters:
session- the component uses this object to access other componentsparameters- configuration values for the component- Throws:
OpenAS2Exception- If an error occurs while initializing the component- See Also:
Session
-
isLogExceptionTrace
public boolean isLogExceptionTrace()
-
setLogExceptionTrace
public void setLogExceptionTrace(boolean logExceptionTrace)
-
setFormatter
public void setFormatter(Formatter formatter)
- Specified by:
setFormatterin interfaceLogger
-
getFormatter
public Formatter getFormatter()
- Specified by:
getFormatterin interfaceLogger
-
log
public void log(java.lang.Throwable t, Level level, boolean terminated)
-
log
public void log(Level level, java.lang.String msgText, Message message, java.lang.Throwable t)
level msgText message
-
isLogging
protected boolean isLogging(OpenAS2Exception exception)
-
getShowDefaults
protected abstract java.lang.String getShowDefaults()
-
isShowing
protected boolean isShowing(java.lang.String value)
-
doLog
protected abstract void doLog(java.lang.Throwable throwable, boolean terminated)
-
-