Constructor and Description |
---|
FileAppender()
Initializes a new instance of the FileAppender class.
|
FileAppender(String fileName)
Initializes a new instance of the FileAppender class.
|
FileAppender(String fileName,
boolean useDate)
Initializes a new instance of the FileAppender class.
|
FileAppender(String fileName,
boolean useDate,
IFormatter formatter)
Initializes a new instance of the FileAppender class.
|
FileAppender(String fileName,
IFormatter formatter)
Initializes a new instance of the FileAppender class.
|
Modifier and Type | Method and Description |
---|---|
void |
append(LogEntry logEntry)
Appends the log entry information to the appender.
|
void |
append(LogEntry[] logEntries)
Appends a set of log entries to the appender.
|
void |
appendHeader()
Starts log file with specific header.
|
void |
close()
Closes the appender.
|
String |
getEncoding()
Gets or sets the encoding.
|
String |
getFileName()
Gets or sets file name.
|
boolean |
getUseDate()
Gets or sets value which indicates whether date is used for logging.
|
void |
setEncoding(String value)
Gets or sets the encoding.
|
void |
setFileName(String value)
Gets or sets file name.
|
void |
setUseDate(boolean value)
Gets or sets value which indicates whether date is used for logging.
|
dispose, dispose, finalize, getClosed, getFormatter, getInitialized, initialize, setFormatter
public FileAppender()
Initializes a new instance of the FileAppender class.
public FileAppender(String fileName)
Initializes a new instance of the FileAppender class.
fileName
- The file name.public FileAppender(String fileName, boolean useDate)
Initializes a new instance of the FileAppender class.
fileName
- The file name.useDate
- Indicates if date is used in file namepublic FileAppender(String fileName, IFormatter formatter)
Initializes a new instance of the FileAppender class.
fileName
- The file name.formatter
- Log formatterpublic FileAppender(String fileName, boolean useDate, IFormatter formatter)
Initializes a new instance of the FileAppender class.
fileName
- The file name.useDate
- Indicates if date is used in file nameformatter
- Log formatterpublic final String getFileName()
Gets or sets file name.
public final void setFileName(String value)
Gets or sets file name.
public final boolean getUseDate()
Gets or sets value which indicates whether date is used for logging.
public final void setUseDate(boolean value)
Gets or sets value which indicates whether date is used for logging.
public final String getEncoding()
Gets or sets the encoding.
public final void setEncoding(String value)
Gets or sets the encoding.
public void append(LogEntry logEntry)
Appends the log entry information to the appender.
public void appendHeader()
Starts log file with specific header.
appendHeader
in interface IAppender
appendHeader
in class Appender
public final void append(LogEntry[] logEntries)
Appends a set of log entries to the appender.
logEntries
- A set of log entries to log.