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 LogLevel getSeverity()
Gets or sets severity.
public void setSeverity(LogLevel value)
Gets or sets severity.
public String getName()
Gets or sets name.
public AppenderCollection getAppenders()
Gets or sets the appender list.
public void setAppenders(AppenderCollection value)
Gets or sets the appender list.
public 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 void writeLine()
Writes the empty line to appenders.
public void writeLine(String message)
Writes the specified message to appenders.
message
- The message to write.public void writeLine(Object message)
Writes the specified message to appenders.
message
- The message to write.public void writeFormat(String format, Object... arguments)
Writes the message with specified format to appenders.
format
- arguments
- public void write(String message)
Writes the specified message to appenders.
message
- The message to write.public 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 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 void write(Object message)
Writes the specified message to appenders.
message
- The message to write.public 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 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 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 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 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 void dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
dispose
in interface com.aspose.ms.System.IDisposable
Copyright (c) 2008-2017 Aspose Pty Ltd. All Rights Reserved.