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 void setFileName(String value)
Gets or sets file name.
value
- a String
object.public boolean getUseDate()
Gets or sets value which indicates whether date is used for logging.
public void setUseDate(boolean value)
Gets or sets value which indicates whether date is used for logging.
value
- a boolean.public void setEncoding(String value)
Gets or sets the encoding.
value
- a String
object.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 void append(LogEntry[] logEntries)
Appends a set of log entries to the appender.
logEntries
- A set of log entries to log.Copyright (c) 2008-2015 Aspose Pty Ltd. All Rights Reserved.