FileAppender
Inheritance: java.lang.Object, com.aspose.email.Appender
public final class FileAppender extends Appender
Reprensents a file appender.
Constructors
Constructor | 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, IFormatter formatter) | Initializes a new instance of the FileAppender class. |
FileAppender(String fileName, boolean useDate, IFormatter formatter) | Initializes a new instance of the FileAppender class. |
Methods
Method | Description |
---|---|
append(LogEntry logEntry) | Appends the log entry information to the appender. |
append(LogEntry[] logEntries) | Appends a set of log entries to the appender. |
appendHeader() | Starts log file with specific header. |
close() | Closes the appender. |
dispose() | Releases the unmanaged resources used by the Appender. |
equals(Object arg0) | |
getClass() | |
getEncoding() | Gets or sets the encoding. |
getFileName() | Gets or sets file name. |
getFormatter() | Gets or sets the formatter. |
getUseDate() | Gets or sets value which indicates whether date is used for logging. |
hashCode() | |
initialize() | Initializes the appender instance. |
notify() | |
notifyAll() | |
setEncoding(String value) | Gets or sets the encoding. |
setFileName(String value) | Gets or sets file name. |
setFormatter(IFormatter value) | Gets or sets the formatter. |
setUseDate(boolean value) | Gets or sets value which indicates whether date is used for logging. |
toString() | |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
FileAppender()
public FileAppender()
Initializes a new instance of the FileAppender class.
FileAppender(String fileName)
public FileAppender(String fileName)
Initializes a new instance of the FileAppender class.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The file name. |
FileAppender(String fileName, boolean useDate)
public FileAppender(String fileName, boolean useDate)
Initializes a new instance of the FileAppender class.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The file name. |
useDate | boolean | Indicates if date is used in file name |
FileAppender(String fileName, IFormatter formatter)
public FileAppender(String fileName, IFormatter formatter)
Initializes a new instance of the FileAppender class.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The file name. |
formatter | IFormatter | Log formatter |
FileAppender(String fileName, boolean useDate, IFormatter formatter)
public FileAppender(String fileName, boolean useDate, IFormatter formatter)
Initializes a new instance of the FileAppender class.
Parameters:
Parameter | Type | Description |
---|---|---|
fileName | java.lang.String | The file name. |
useDate | boolean | Indicates if date is used in file name |
formatter | IFormatter | Log formatter |
append(LogEntry logEntry)
public void append(LogEntry logEntry)
Appends the log entry information to the appender.
Parameters:
Parameter | Type | Description |
---|---|---|
logEntry | LogEntry | The log entry. |
append(LogEntry[] logEntries)
public final void append(LogEntry[] logEntries)
Appends a set of log entries to the appender.
Parameters:
Parameter | Type | Description |
---|---|---|
logEntries | LogEntry[] | A set of log entries to log. |
appendHeader()
public void appendHeader()
Starts log file with specific header.
close()
public void close()
Closes the appender.
dispose()
public final void dispose()
Releases the unmanaged resources used by the Appender.
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getEncoding()
public final String getEncoding()
Gets or sets the encoding.
Returns: java.lang.String
getFileName()
public final String getFileName()
Gets or sets file name.
Returns: java.lang.String
getFormatter()
public final IFormatter getFormatter()
Gets or sets the formatter.
Returns: IFormatter
getUseDate()
public final boolean getUseDate()
Gets or sets value which indicates whether date is used for logging.
Returns: boolean
hashCode()
public native int hashCode()
Returns: int
initialize()
public void initialize()
Initializes the appender instance.
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setEncoding(String value)
public final void setEncoding(String value)
Gets or sets the encoding.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setFileName(String value)
public final void setFileName(String value)
Gets or sets file name.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setFormatter(IFormatter value)
public final void setFormatter(IFormatter value)
Gets or sets the formatter.
Parameters:
Parameter | Type | Description |
---|---|---|
value | IFormatter |
setUseDate(boolean value)
public final void setUseDate(boolean value)
Gets or sets value which indicates whether date is used for logging.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |