Logger

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.ms.System.IDisposable

public final class Logger implements System.IDisposable

Provides the logging functionality.

Methods

MethodDescription
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
equals(Object arg0)
getAppenders()Gets or sets the appender list.
getClass()
getDebug()Gets the debug logger.
getName()Gets or sets name.
getSeverity()Gets or sets severity.
hashCode()
isEnabled(LogLevel level)Determines if logging is enabled for the specified level.
notify()
notifyAll()
setAppenders(AppenderCollection value)Gets or sets the appender list.
setSeverity(LogLevel value)Gets or sets severity.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)
write(Object message)Writes the specified message to appenders.
write(String message)Writes the specified message to appenders.
write(String message, Exception exception)Writes the specified message and exception to appenders.
write(String message, Exception ex, LogLevel level)Writes the specified message and exception to appenders.
writeFormat(String format, Object[] arguments)Writes the message with specified format to appenders.
writeIf(boolean condition, Object message)Writes the specified message to appenders if condition is true.
writeIf(boolean condition, Object message, Exception exception)Writes the specified message and exception to appenders if condition is true.
writeIf(boolean condition, String message)Writes the specified message to appenders if condition is true.
writeIf(LogLevel condition, String message)Writes the specified message if the log level is enabled.
writeIf(LogLevel condition, String message, Exception exception)Writes the specified message and exception if the log level is enabled.
writeLine()Writes the empty line to appenders.
writeLine(Object message)Writes the specified message to appenders.
writeLine(String message)Writes the specified message to appenders.

dispose()

public final void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAppenders()

public final AppenderCollection getAppenders()

Gets or sets the appender list.

Returns: AppenderCollection

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDebug()

public static Logger getDebug()

Gets the debug logger.

Returns: Logger

getName()

public final String getName()

Gets or sets name.

Returns: java.lang.String

getSeverity()

public final LogLevel getSeverity()

Gets or sets severity.

Returns: LogLevel

hashCode()

public native int hashCode()

Returns: int

isEnabled(LogLevel level)

public final boolean isEnabled(LogLevel level)

Determines if logging is enabled for the specified level.

Parameters:

ParameterTypeDescription
levelLogLevellevel to be checked

Returns: boolean - if logging is enabled for the specified level, otherwise it returns .

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAppenders(AppenderCollection value)

public final void setAppenders(AppenderCollection value)

Gets or sets the appender list.

Parameters:

ParameterTypeDescription
valueAppenderCollection

setSeverity(LogLevel value)

public final void setSeverity(LogLevel value)

Gets or sets severity.

Parameters:

ParameterTypeDescription
valueLogLevel

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

write(Object message)

public final void write(Object message)

Writes the specified message to appenders.

Parameters:

ParameterTypeDescription
messagejava.lang.ObjectThe message to write.

write(String message)

public final void write(String message)

Writes the specified message to appenders.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message to write.

write(String message, Exception exception)

public final void write(String message, Exception exception)

Writes the specified message and exception to appenders.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message to write.
exceptionjava.lang.ExceptionThe exception to write.

write(String message, Exception ex, LogLevel level)

public final void write(String message, Exception ex, LogLevel level)

Writes the specified message and exception to appenders.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message to write.
exjava.lang.ExceptionThe exception to write.
levelLogLevelThe log level.

writeFormat(String format, Object[] arguments)

public final void writeFormat(String format, Object[] arguments)

Writes the message with specified format to appenders.

Parameters:

ParameterTypeDescription
formatjava.lang.String
argumentsjava.lang.Object[]

writeIf(boolean condition, Object message)

public final void writeIf(boolean condition, Object message)

Writes the specified message to appenders if condition is true.

Parameters:

ParameterTypeDescription
conditionbooleanThe condition to test.
messagejava.lang.ObjectThe message to write.

writeIf(boolean condition, Object message, Exception exception)

public final void writeIf(boolean condition, Object message, Exception exception)

Writes the specified message and exception to appenders if condition is true.

Parameters:

ParameterTypeDescription
conditionbooleanThe condition to test.
messagejava.lang.ObjectThe message to write.
exceptionjava.lang.ExceptionThe exception to write.

writeIf(boolean condition, String message)

public final void writeIf(boolean condition, String message)

Writes the specified message to appenders if condition is true.

Parameters:

ParameterTypeDescription
conditionbooleanThe condition to test.
messagejava.lang.StringThe message to write.

writeIf(LogLevel condition, String message)

public final void writeIf(LogLevel condition, String message)

Writes the specified message if the log level is enabled.

Parameters:

ParameterTypeDescription
conditionLogLevelThe log level.
messagejava.lang.StringThe message to log.

writeIf(LogLevel condition, String message, Exception exception)

public final void writeIf(LogLevel condition, String message, Exception exception)

Writes the specified message and exception if the log level is enabled.

Parameters:

ParameterTypeDescription
conditionLogLevelThe log level.
messagejava.lang.StringThe message to log.
exceptionjava.lang.ExceptionThe exception to log.

writeLine()

public final void writeLine()

Writes the empty line to appenders.

writeLine(Object message)

public final void writeLine(Object message)

Writes the specified message to appenders.

Parameters:

ParameterTypeDescription
messagejava.lang.ObjectThe message to write.

writeLine(String message)

public final void writeLine(String message)

Writes the specified message to appenders.

Parameters:

ParameterTypeDescription
messagejava.lang.StringThe message to write.