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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
level | LogLevel | level 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:
Parameter | Type | Description |
---|---|---|
value | AppenderCollection |
setSeverity(LogLevel value)
public final void setSeverity(LogLevel value)
Gets or sets severity.
Parameters:
Parameter | Type | Description |
---|---|---|
value | LogLevel |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |
write(Object message)
public final void write(Object message)
Writes the specified message to appenders.
Parameters:
Parameter | Type | Description |
---|---|---|
message | java.lang.Object | The message to write. |
write(String message)
public final void write(String message)
Writes the specified message to appenders.
Parameters:
Parameter | Type | Description |
---|---|---|
message | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
message | java.lang.String | The message to write. |
exception | java.lang.Exception | The 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:
Parameter | Type | Description |
---|---|---|
message | java.lang.String | The message to write. |
ex | java.lang.Exception | The exception to write. |
level | LogLevel | The log level. |
writeFormat(String format, Object[] arguments)
public final void writeFormat(String format, Object[] arguments)
Writes the message with specified format to appenders.
Parameters:
Parameter | Type | Description |
---|---|---|
format | java.lang.String | |
arguments | java.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:
Parameter | Type | Description |
---|---|---|
condition | boolean | The condition to test. |
message | java.lang.Object | The 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:
Parameter | Type | Description |
---|---|---|
condition | boolean | The condition to test. |
message | java.lang.Object | The message to write. |
exception | java.lang.Exception | The 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:
Parameter | Type | Description |
---|---|---|
condition | boolean | The condition to test. |
message | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
condition | LogLevel | The log level. |
message | java.lang.String | The 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:
Parameter | Type | Description |
---|---|---|
condition | LogLevel | The log level. |
message | java.lang.String | The message to log. |
exception | java.lang.Exception | The 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:
Parameter | Type | Description |
---|---|---|
message | java.lang.Object | The message to write. |
writeLine(String message)
public final void writeLine(String message)
Writes the specified message to appenders.
Parameters:
Parameter | Type | Description |
---|---|---|
message | java.lang.String | The message to write. |