FileLogger

Inheritance: java.lang.Object

All Implemented Interfaces: com.groupdocs.foundation.logging.ILogger

public class FileLogger implements ILogger

Writes log messages to the file.

Constructors

Constructor Description
FileLogger(String fileName) Create logger to file.
FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled) Create logger to file.

Methods

Method Description
trace(String message, Object[] arguments) Writes a trace message to the console.
trace(Throwable throwable, String message, Object[] arguments) Writes a trace message to the console.
isTraceEnabled()
debug(String message, Object[] arguments) Writes a debug message to the console.
debug(Throwable throwable, String message, Object[] arguments) Writes a debug message to the console.
isDebugEnabled()
warning(String message, Object[] arguments) Writes a warning message to the console.
warning(Throwable throwable, String message, Object[] arguments) Writes a warning message to the console.
isWarningEnabled()
error(String message, Object[] arguments) Writes an error message to the console.
error(Throwable throwable, String message, Object[] arguments) Writes an error message to the console.
isErrorEnabled()

FileLogger(String fileName)

public FileLogger(String fileName)

Create logger to file.

Parameters:

Parameter Type Description
fileName java.lang.String Full file name with path

FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled)

public FileLogger(String fileName, boolean isTraceEnabled, boolean isDebugEnabled, boolean isWarningEnabled, boolean isErrorEnabled)

Create logger to file.

Parameters:

Parameter Type Description
fileName java.lang.String
isTraceEnabled boolean
isDebugEnabled boolean
isWarningEnabled boolean
isErrorEnabled boolean

trace(String message, Object[] arguments)

public void trace(String message, Object[] arguments)

Writes a trace message to the console. Trace log messages provide generally useful information about application flow.

Parameters:

Parameter Type Description
message java.lang.String The trace message.
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

trace(Throwable throwable, String message, Object[] arguments)

public void trace(Throwable throwable, String message, Object[] arguments)

Writes a trace message to the console. Trace log messages provide generally useful information about application flow.

Parameters:

Parameter Type Description
throwable java.lang.Throwable The exception
message java.lang.String The trace message.
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

isTraceEnabled()

public boolean isTraceEnabled()

Checks is trace logging enabled

Returns: boolean

debug(String message, Object[] arguments)

public void debug(String message, Object[] arguments)

Writes a debug message to the console. Debug log messages provide information about different processes in application flow.

Parameters:

Parameter Type Description
message java.lang.String The debug message.
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

debug(Throwable throwable, String message, Object[] arguments)

public void debug(Throwable throwable, String message, Object[] arguments)

Writes a debug message to the console. Debug log messages provide information about different processes in application flow.

Parameters:

Parameter Type Description
throwable java.lang.Throwable The exception
message java.lang.String The debug message.
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

isDebugEnabled()

public boolean isDebugEnabled()

Checks is debug logging enabled

Returns: boolean

warning(String message, Object[] arguments)

public void warning(String message, Object[] arguments)

Writes a warning message to the console. Warning log messages provide information about unexpected and recoverable events in application flow.

Parameters:

Parameter Type Description
message java.lang.String The warning message.
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

warning(Throwable throwable, String message, Object[] arguments)

public void warning(Throwable throwable, String message, Object[] arguments)

Writes a warning message to the console. Warning log messages provide information about unexpected and recoverable events in application flow.

Parameters:

Parameter Type Description
throwable java.lang.Throwable The exception
message java.lang.String The warning message.
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

isWarningEnabled()

public boolean isWarningEnabled()

Checks is warning logging enabled

Returns: boolean

error(String message, Object[] arguments)

public void error(String message, Object[] arguments)

Writes an error message to the console. Error log messages provide information about unrecoverable events in application flow.

Parameters:

Parameter Type Description
message java.lang.String The error message
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

error(Throwable throwable, String message, Object[] arguments)

public void error(Throwable throwable, String message, Object[] arguments)

Writes an error message to the console. Error log messages provide information about unrecoverable events in application flow.

Parameters:

Parameter Type Description
throwable java.lang.Throwable The exception
message java.lang.String The error message
arguments java.lang.Object[] The arguments, replaces {} in message in order of passing

isErrorEnabled()

public boolean isErrorEnabled()

Checks is error logging enabled

Returns: boolean