Package org.openas2.logging
Class FileLogger
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.logging.BaseLogger
-
- org.openas2.logging.FileLogger
-
public class FileLogger extends BaseLogger
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
fileWriteLock
static java.lang.String
PARAM_FILENAME
-
Fields inherited from class org.openas2.logging.BaseLogger
PARAM_EXCEPTIONS, PARAM_SHOW, VALUE_SHOW_ALL, VALUE_SHOW_EXCEPTIONS, VALUE_SHOW_INFO, VALUE_SHOW_TERMINATED
-
-
Constructor Summary
Constructors Constructor Description FileLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendToFile(java.lang.String text)
protected ParameterParser
createParser()
protected void
doLog(java.lang.Throwable t, boolean terminated)
void
doLog(Level level, java.lang.String msgText, Message as2Msg)
protected java.io.File
getLogFile()
protected java.lang.String
getShowDefaults()
void
init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)
Component lifecycle hook.-
Methods inherited from class org.openas2.logging.BaseLogger
getFormatter, isLogExceptionTrace, isLogging, isShowing, log, log, setFormatter, setLogExceptionTrace
-
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_FILENAME
public static final java.lang.String PARAM_FILENAME
- See Also:
- Constant Field Values
-
fileWriteLock
private final java.lang.Object fileWriteLock
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:Component
Component 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:
init
in interfaceComponent
- Overrides:
init
in classBaseLogger
- 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
-
getShowDefaults
protected java.lang.String getShowDefaults()
- Specified by:
getShowDefaults
in classBaseLogger
-
appendToFile
protected void appendToFile(java.lang.String text)
-
getLogFile
protected java.io.File getLogFile() throws OpenAS2Exception
- Throws:
OpenAS2Exception
-
createParser
protected ParameterParser createParser()
-
doLog
protected void doLog(java.lang.Throwable t, boolean terminated)
- Specified by:
doLog
in classBaseLogger
-
doLog
public void doLog(Level level, java.lang.String msgText, Message as2Msg)
- Specified by:
doLog
in classBaseLogger
-
-