Class: LoggerTarget

system.logging. LoggerTarget


new LoggerTarget(message, level, logger)

Use the LoggerTarget objects to display, store, or pass log messages to another destination.

LoggerTarget are used to display, store, or pass log messages to another destination. There are two kinds of target; those that receive and handle the messages, and those that buffer or route the messages to another target.

The logging system dispatches a single message each time a process requests information be logged.

This entry can be captured by any object for storage or formatting.

Parameters:
Name Type Description
message

The context or message of the log.

level

The level of the log.

logger

The Logger reference of this entry.

Members


factory :system.logging.LoggerFactory

Determinates the LoggerFactory reference of the target, by default the target use the system.logging.Log singleton.

Type:

filters

Determinates the filters array representation of the target.


level

Determinates the level (LoggerLevel of this target.

Methods


addFilter(channel)

Inserts a channel in the fllters if this channel don't exist.

Parameters:
Name Type Description
channel string

The channel to rgister.

Returns:

true if the channel is add in the list.


addLogger(logger)

Sets up this target with the specified logger. Note : this method is called by the framework and should not be called by the developer.

Parameters:
Name Type Description
logger system.logging.Logger

The logger to register.


logEntry(entry)

This method receive a LoggerEntry from an associated logger. A target uses this method to translate the event into the appropriate format for transmission, storage, or display. This method will be called only if the event's level is in range of the target's level. Descendants need to override this method to make it useful.

Parameters:
Name Type Description
entry system.logging.LogEntry

The log entry reference.


logEntry(values)

This method is called when the receiver is connected with a Signal object.

Parameters:
Name Type Description
values *

All the values emitting by the signals connected with this object.


removeFilter(channel)

Removes a channel in the fllters collection if this channel exist.

Parameters:
Name Type Description
channel string

The channel to unregister.

Returns:

true if the channel is removed.


removeLogger()

Stops this target from receiving events from the specified logger.


toString()

Returns the String representation of the object.

Returns:

the String representation of the object.