Class: LoggerProxy

LoggerProxy

Offers a simple proxy to Logger instances. The proxied instance can be switched at any time with a different one.
Other than the proxied methods it offers some utility methods that will join together all of the specified parameters in a single string before passing it to the proxied instance.

new LoggerProxy()

This constructor is used internally by LoggerManager and should not be called manually. Use LoggerManager#getLoggerProxy to obtain a LoggerProxy instance.

Method Summary

debug
Proxies the call to the underling {@Logger}
error
Proxies the call to the underling {@Logger}
fatal
Proxies the call to the underling {@Logger}
info
Proxies the call to the underling {@Logger}
isDebugLogEnabled
Proxies the call to the underling {@Logger}
isErrorLogEnabled
Proxies the call to the underling {@Logger}
isFatalLogEnabled
Proxies the call to the underling {@Logger}
isInfoLogEnabled
Proxies the call to the underling {@Logger}
isWarnLogEnabled
Proxies the call to the underling {@Logger}
logDebug
Joins all the specified parameters and calls Logger#debug on the proxied instance.
logError
Joins all the specified parameters and calls Logger#error on the proxied instance.
logErrorExc
Joins all the specified parameters and calls Logger#error on the proxied instance.
logFatal
Joins all the specified parameters and calls Logger#fatal on the proxied instance.
logInfo
Joins all the specified parameters and calls Logger#info on the proxied instance.
logWarn
Joins all the specified parameters and calls Logger#warn on the proxied instance.
setWrappedInstance
Called by LoggerManager to redirect the log to a different Logger
warn
Proxies the call to the underling {@Logger}

Method Detail

debug(message, exception)

Proxies the call to the underling {@Logger}
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.

error(message, exception)

Proxies the call to the underling {@Logger}
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.

fatal(message, exception)

Proxies the call to the underling {@Logger}
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.

info(message, exception)

Proxies the call to the underling {@Logger}
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.

isDebugLogEnabled()

Proxies the call to the underling {@Logger}

isErrorLogEnabled()

Proxies the call to the underling {@Logger}

isFatalLogEnabled()

Proxies the call to the underling {@Logger}

isInfoLogEnabled()

Proxies the call to the underling {@Logger}

isWarnLogEnabled()

Proxies the call to the underling {@Logger}

logDebug(mex)

Joins all the specified parameters and calls Logger#debug on the proxied instance.
Parameters:
Name Type Argument Description
mex * <repeatable>
The string or object to be logged.

logError(mex)

Joins all the specified parameters and calls Logger#error on the proxied instance.
Parameters:
Name Type Argument Description
mex * <repeatable>
The string or object to be logged.

logErrorExc(mex)

Joins all the specified parameters and calls Logger#error on the proxied instance.
Parameters:
Name Type Argument Description
mex * <repeatable>
The string or object to be logged.

logFatal(mex)

Joins all the specified parameters and calls Logger#fatal on the proxied instance.
Parameters:
Name Type Argument Description
mex * <repeatable>
The string or object to be logged.

logInfo(mex)

Joins all the specified parameters and calls Logger#info on the proxied instance.
Parameters:
Name Type Argument Description
mex * <repeatable>
The string or object to be logged.

logWarn(mex)

Joins all the specified parameters and calls Logger#warn on the proxied instance.
Parameters:
Name Type Argument Description
mex * <repeatable>
The string or object to be logged.

setWrappedInstance(toWrap)

Called by LoggerManager to redirect the log to a different Logger
Parameters:
Name Type Argument Description
toWrap Logger <optional>

warn(message, exception)

Proxies the call to the underling {@Logger}
Parameters:
Name Type Argument Description
message String The message to be logged.
exception Exception <optional>
An Exception instance related to the current log message.