public final class Logger extends Object implements com.aspose.ms.System.IDisposable
Provides the logging functionality.
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
AppenderCollection |
getAppenders()
Gets or sets the appender list.
|
static Logger |
getDebug()
Gets the debug logger.
|
String |
getName()
Gets or sets name.
|
LogLevel |
getSeverity()
Gets or sets severity.
|
boolean |
isEnabled(LogLevel level)
Determines if logging is enabled for the specified level.
|
void |
setAppenders(AppenderCollection value)
Gets or sets the appender list.
|
void |
setSeverity(LogLevel value)
Gets or sets severity.
|
void |
write(Object message)
Writes the specified message to appenders.
|
void |
write(String message)
Writes the specified message to appenders.
|
void |
write(String message,
Exception exception)
Writes the specified message and exception to appenders.
|
void |
write(String message,
Exception ex,
LogLevel level)
Writes the specified message and exception to appenders.
|
void |
writeFormat(String format,
Object... arguments)
Writes the message with specified format to appenders.
|
void |
writeIf(boolean condition,
Object message)
Writes the specified message to appenders if condition is true.
|
void |
writeIf(boolean condition,
Object message,
Exception exception)
Writes the specified message and exception to appenders if condition is true.
|
void |
writeIf(boolean condition,
String message)
Writes the specified message to appenders if condition is true.
|
void |
writeIf(LogLevel condition,
String message)
Writes the specified message if the log level is enabled.
|
void |
writeIf(LogLevel condition,
String message,
Exception exception)
Writes the specified message and exception if the log level is enabled.
|
void |
writeLine()
Writes the empty line to appenders.
|
void |
writeLine(Object message)
Writes the specified message to appenders.
|
void |
writeLine(String message)
Writes the specified message to appenders.
|
public static Logger getDebug()
Gets the debug logger.
public final LogLevel getSeverity()
Gets or sets severity.
public final void setSeverity(LogLevel value)
Gets or sets severity.
public final String getName()
Gets or sets name.
public final AppenderCollection getAppenders()
Gets or sets the appender list.
public final void setAppenders(AppenderCollection value)
Gets or sets the appender list.
public final boolean isEnabled(LogLevel level)
Determines if logging is enabled for the specified level.
level
- level to be checked
if logging is enabled for the specified level, otherwise it returns
.public final void writeLine()
Writes the empty line to appenders.
public final void writeLine(String message)
Writes the specified message to appenders.
message
- The message to write.public final void writeLine(Object message)
Writes the specified message to appenders.
message
- The message to write.public final void writeFormat(String format, Object... arguments)
Writes the message with specified format to appenders.
format
- arguments
- public final void write(String message)
Writes the specified message to appenders.
message
- The message to write.public final void write(String message, Exception exception)
Writes the specified message and exception to appenders.
message
- The message to write.exception
- The exception to write.public final void write(String message, Exception ex, LogLevel level)
Writes the specified message and exception to appenders.
message
- The message to write.ex
- The exception to write.level
- The log level.public final void write(Object message)
Writes the specified message to appenders.
message
- The message to write.public final void writeIf(boolean condition, String message)
Writes the specified message to appenders if condition is true.
condition
- The condition to test.message
- The message to write.public final void writeIf(boolean condition, Object message)
Writes the specified message to appenders if condition is true.
condition
- The condition to test.message
- The message to write.public final void writeIf(boolean condition, Object message, Exception exception)
Writes the specified message and exception to appenders if condition is true.
condition
- The condition to test.message
- The message to write.exception
- The exception to write.public final void writeIf(LogLevel condition, String message)
Writes the specified message if the log level is enabled.
condition
- The log level.message
- The message to log.public final void writeIf(LogLevel condition, String message, Exception exception)
Writes the specified message and exception if the log level is enabled.
condition
- The log level.message
- The message to log.exception
- The exception to log.public final void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable