Package com.ibm.di.api.syslog
Class SystemLogAppender
- java.lang.Object
-
- com.ibm.di.api.syslog.SystemLogAppender
-
public class SystemLogAppender extends java.lang.Object
This class extend theFileAppender
class and defines API for writing logs to system files.
-
-
Constructor Summary
Constructors Constructor Description SystemLogAppender()
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generateFileName()
Creates a simple and absolute file name with the name of the component and current date in the root directory specified by theLogUtils
class.java.lang.String
getComponentName()
Retrieves component name.java.lang.String
getConfigId()
Retrieves configuration ID.java.lang.String
getFile()
Returns absolute path for the log file.java.lang.String
getFileName()
Retrieves file name.int
getMaxGenerations()
void
setComponentName(java.lang.String aComponentName)
Sets the name of the component.void
setConfigId(java.lang.String aConfigId)
Sets the configuration id.void
setConfigInstance(java.lang.Object configInstance)
Sets the configuration id using a configInstance.void
setMaxGenerations(java.lang.String number)
Sets max generations of log files
-
-
-
Method Detail
-
setComponentName
public void setComponentName(java.lang.String aComponentName) throws java.lang.Exception
Sets the name of the component.- Parameters:
aComponentName
- String ,AssemblyLine
- Throws:
java.lang.Exception
- : never.
-
getComponentName
public java.lang.String getComponentName() throws java.lang.Exception
Retrieves component name.- Returns:
- String. The component name.
- Throws:
java.lang.Exception
- : never.
-
setConfigId
public void setConfigId(java.lang.String aConfigId) throws java.lang.Exception
Sets the configuration id.- Parameters:
aConfigId
- String- Throws:
java.lang.Exception
- : never.
-
setConfigInstance
public void setConfigInstance(java.lang.Object configInstance) throws java.lang.Exception
Sets the configuration id using a configInstance.- Parameters:
configInstance
- object implementingRSInterface
.- Throws:
java.lang.Exception
- if configuration cannot be set.
-
getConfigId
public java.lang.String getConfigId() throws java.lang.Exception
Retrieves configuration ID.- Returns:
- the configuration id.
- Throws:
java.lang.Exception
- : never
-
getFileName
public java.lang.String getFileName()
Retrieves file name.- Returns:
- String, the file name.
-
setMaxGenerations
public void setMaxGenerations(java.lang.String number)
Sets max generations of log files- Parameters:
number
-
-
generateFileName
public void generateFileName() throws java.lang.Exception
Creates a simple and absolute file name with the name of the component and current date in the root directory specified by theLogUtils
class.- Throws:
java.lang.Exception
- if the component type has not been assigned.
-
getFile
public java.lang.String getFile()
Returns absolute path for the log file.- Returns:
-
getMaxGenerations
public int getMaxGenerations()
-
-