Class: LoggerFactory

system.logging. LoggerFactory


new LoggerFactory()

This factory provides pseudo-hierarchical logging capabilities with multiple format and output options.

This factory provides pseudo-hierarchical logging capabilities with multiple format and output options.

This class in an internal class in the package system.logging you can use the Log singleton to deploy all the loggers in your application.

Implements:

Methods


<static> isAll()

Indicates whether a 'all' level log event will be processed by a log target.

Returns:

true if a 'all' level log event will be logged; otherwise false.


<static> isCritical()

Indicates whether a 'critical' level log event will be processed by a log target.

Returns:

true if a 'critical' level log event will be logged; otherwise false.


<static> isDebug()

Indicates whether a 'debug' level log event will be processed by a log target.

Returns:

true if a 'debug' level log event will be logged; otherwise false.


<static> isError()

Indicates whether a 'error' level log event will be processed by a log target.

Returns:

true if a 'error' level log event will be logged; otherwise false.


<static> isInfo()

Indicates whether a 'info' level log event will be processed by a log target.

Returns:

true if a 'info' level log event will be logged; otherwise false.


<static> isWarning()

Indicates whether a 'warn' level log event will be processed by a log target.

Returns:

true if a 'warn' level log event will be logged; otherwise false.


<static> isWtf()

Indicates whether a 'wtf' level log event will be processed by a log target.

Returns:

true if a 'wtf' level log event will be logged; otherwise false.


<static> removeTarget(target)

Stops the specified target from receiving notification of log events.

Parameters:
Name Type Description
target system.logging.LoggerTarget

The specific target that should capture log events.

Throws:

Error If the target is invalid.


<static> toString()

Returns the String representation of the object.

Returns:

the String representation of the object.


addTarget(target)

Allows the specified target to begin receiving notification of log events.

Parameters:
Name Type Description
target system.logging.LoggerTarget

The specific target that should capture log events.

Throws:

Error If the target is invalid.


flush()

This method removes all of the current loggers from the cache of the factory. Subsquent calls to the getLogger() method return new instances of loggers rather than any previous instances with the same category. This method is intended for use in debugging only.


getLogger(channel)

Returns the logger associated with the specified channel.

If the category given doesn't exist a new instance of a logger will be returned and associated with that channel.

Channels must be at least one character in length and may not contain any blanks or any of the following characters: []~$^&\/(){}<>+=`!#%?,:;'"@

This method will throw an InvalidChannelError if the category specified is malformed.

Parameters:
Name Type Description
channel string

The channel of the logger that should be returned.

Returns:

An instance of a logger object for the specified name. If the name doesn't exist, a new instance with the specified name is returned.


hasIllegalCharacters(value)

This method checks the specified string value for illegal characters.

Parameters:
Name Type Description
value string

The String to check for illegal characters. The following characters are not valid: []~$^&\/(){}<>+=`!#%?,:;'"@

Returns:

true if there are any illegal characters found, false otherwise.