public final class Logger extends Object
Provides the logging functionality.
Modifier and Type | Method and Description |
---|---|
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 |
log(String message,
com.aspose.ms.System.Exception exception,
LogLevel level)
Logs the specified message and exception if the log level is enabled.
|
void |
log(String message,
LogLevel level)
Logs the specified message if the log level is enabled.
|
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,
com.aspose.ms.System.Exception exception)
Writes the specified message and exception to appenders.
|
void |
writeFormat(String format,
Object... args)
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,
String message)
Writes the specified message to appenders if condition is true.
|
void |
writeIf(boolean condition,
String message,
com.aspose.ms.System.Exception exception)
Writes the specified message and exception to appenders if condition is true.
|
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 AppenderCollection getAppenders()
Gets or sets the appender list.
AppenderCollection
object.public void setAppenders(AppenderCollection value)
Gets or sets the appender list.
value
- a AppenderCollection
object.public void setSeverity(LogLevel value)
Gets or sets severity.
value
- a LogLevel
object.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 log(String message, com.aspose.ms.System.Exception exception, LogLevel level)
Logs the specified message and exception if the log level is enabled.
message
- The message to log.exception
- The exception to log.level
- The log level.public void log(String message, LogLevel level)
Logs the specified message if the log level is enabled.
message
- The message to log.level
- The log level.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 writeLine()
Writes the empty line to appenders.
public void writeFormat(String format, Object... args)
Writes the message with specified format to appenders.
public void write(String message, com.aspose.ms.System.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)
Writes the specified message to appenders.
message
- The message to write.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, String message, com.aspose.ms.System.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.Copyright (c) 2008-2015 Aspose Pty Ltd. All Rights Reserved.