FileAppender

Inheritance: java.lang.Object, com.aspose.email.Appender

public final class FileAppender extends Appender

Reprensents a file appender.

Constructors

ConstructorDescription
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

MethodDescription
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:

ParameterTypeDescription
fileNamejava.lang.StringThe file name.

FileAppender(String fileName, boolean useDate)

public FileAppender(String fileName, boolean useDate)

Initializes a new instance of the FileAppender class.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringThe file name.
useDatebooleanIndicates 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:

ParameterTypeDescription
fileNamejava.lang.StringThe file name.
formatterIFormatterLog 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:

ParameterTypeDescription
fileNamejava.lang.StringThe file name.
useDatebooleanIndicates if date is used in file name
formatterIFormatterLog formatter

append(LogEntry logEntry)

public void append(LogEntry logEntry)

Appends the log entry information to the appender.

Parameters:

ParameterTypeDescription
logEntryLogEntryThe log entry.

append(LogEntry[] logEntries)

public final void append(LogEntry[] logEntries)

Appends a set of log entries to the appender.

Parameters:

ParameterTypeDescription
logEntriesLogEntry[]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:

ParameterTypeDescription
arg0java.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:

ParameterTypeDescription
valuejava.lang.String

setFileName(String value)

public final void setFileName(String value)

Gets or sets file name.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setFormatter(IFormatter value)

public final void setFormatter(IFormatter value)

Gets or sets the formatter.

Parameters:

ParameterTypeDescription
valueIFormatter

setUseDate(boolean value)

public final void setUseDate(boolean value)

Gets or sets value which indicates whether date is used for logging.

Parameters:

ParameterTypeDescription
valueboolean

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int