| Package | org.as3commons.logging.api |
| Class | public final class Logger |
| Inheritance | Logger Object |
| Implements | ILogger |
ILogger implementation. This class is used
by the LoggerFactory in the setup process.
A Logger instance is created for each logger requested from
the factory. The Logger instances do get augmented by
ILogSetup in the setup process.
See also
| Property | Defined By | ||
|---|---|---|---|
| allTargets : ILogTarget [write-only]
Sets all loggers to the passed-in logTarget. | Logger | ||
| debugEnabled : Boolean [read-only]
true if debug actually does something. | Logger | ||
| debugTarget : ILogTarget The logger for debug level, if not added (== null) debug is not enabled. | Logger | ||
| errorEnabled : Boolean [read-only]
true if error actually does something. | Logger | ||
| errorTarget : ILogTarget The logger for error level, if not added (== null) error is not enabled. | Logger | ||
| fatalEnabled : Boolean [read-only]
true if fatal works. | Logger | ||
| fatalTarget : ILogTarget The logger for fatal level, if not added (== null) fatal is not enabled. | Logger | ||
| infoEnabled : Boolean [read-only]
true if info actually does something. | Logger | ||
| infoTarget : ILogTarget The logger for debug level, if not added (== null) info is not enabled. | Logger | ||
| name : String [read-only]
Getter for the name this instance. | Logger | ||
| person : String [read-only]
Returns the person that this logger created. | Logger | ||
| shortName : String [read-only]
Returns the short form of the name. | Logger | ||
| warnEnabled : Boolean [read-only]
true if warn actually does something. | Logger | ||
| warnTarget : ILogTarget The logger for warn level, if not added (== null) warn is not enabled. | Logger | ||
| Method | Defined By | ||
|---|---|---|---|
Logger(name:String, person:String = null)
Creates a new Logger Proxy. | Logger | ||
debug(message:*, parameters:Array = null):void
Logs a message for debug purposes. | Logger | ||
error(message:*, parameters:Array = null):void
Logs a message to notify about an error that was dodged by the application. | Logger | ||
fatal(message:*, parameters:Array = null):void
Logs a message to notify about an error that broke the application and
couldn't be fixed automatically. | Logger | ||
info(message:*, parameters:Array = null):void
Logs a message for notification purposes. | Logger | ||
toString():String
String representation of the Logger. | Logger | ||
warn(message:*, parameters:Array = null):void
Logs a message for warning about a undesirable application state. | Logger | ||
| allTargets | property |
allTargets:ILogTarget [write-only] Sets all loggers to the passed-in logTarget.
public function set allTargets(value:ILogTarget):void| debugEnabled | property |
debugEnabled:Boolean [read-only]
true if debug actually does something.
public function get debugEnabled():Boolean| debugTarget | property |
public var debugTarget:ILogTarget The logger for debug level, if not added (== null) debug is not enabled.
| errorEnabled | property |
errorEnabled:Boolean [read-only]
true if error actually does something.
public function get errorEnabled():Boolean| errorTarget | property |
public var errorTarget:ILogTarget The logger for error level, if not added (== null) error is not enabled.
| fatalEnabled | property |
fatalEnabled:Boolean [read-only]
true if fatal works.
public function get fatalEnabled():Boolean| fatalTarget | property |
public var fatalTarget:ILogTarget The logger for fatal level, if not added (== null) fatal is not enabled.
| infoEnabled | property |
infoEnabled:Boolean [read-only]
true if info actually does something.
public function get infoEnabled():Boolean| infoTarget | property |
public var infoTarget:ILogTarget The logger for debug level, if not added (== null) info is not enabled.
| name | property |
name:String [read-only] Getter for the name this instance.
public function get name():String| person | property |
person:String [read-only] Returns the person that this logger created.
For person based log statements loggers contain a optional information that can be used to filter for persons that created the logggers
public function get person():String| shortName | property |
shortName:String [read-only] Returns the short form of the name.
The name of a ILogger is usually [package].[class]. The
short name contains only the name of [class], in other words: the content
after the last ".".
public function get shortName():String| warnEnabled | property |
warnEnabled:Boolean [read-only]
true if warn actually does something.
public function get warnEnabled():Boolean| warnTarget | property |
public var warnTarget:ILogTarget The logger for warn level, if not added (== null) warn is not enabled.
| Logger | () | Constructor |
public function Logger(name:String, person:String = null)
Creates a new Logger Proxy.
name:String — Name of the logger
| |
person:String (default = null) |
| debug | () | method |
public function debug(message:*, parameters:Array = null):voidLogs a message for debug purposes.
Debug messages should be messages that are additional output used to ease the debugging of an application.
A message can contain place holders that are filled with the additional
parameters. The ILogTarget implementation may treat the
options as they want.
Example for a message with parameters:
logger.debug("A: {0} is B: {1}", "Hello", "World");
// A: Hello is B: World
Parameters
message:* — Message that should be logged.
| |
parameters:Array (default = null) — List of parameters.
|
| error | () | method |
public function error(message:*, parameters:Array = null):voidLogs a message to notify about an error that was dodged by the application.
The Error level is designated to be used in case an error occurred and the error could be dodged. It should contain hints about why that error occurs and if there is a common case where this error occurs.
A message can contain place holders that are filled with the additional
parameters. The ILogTarget implementation may treat the
options as they want.
Example for a message with parameters:
logger.error("A: {0} is B: {1}", "Hello", "World");
// A: Hello is B: World
Parameters
message:* — Message that should be logged.
| |
parameters:Array (default = null) — List of parameters.
|
| fatal | () | method |
public function fatal(message:*, parameters:Array = null):voidLogs a message to notify about an error that broke the application and couldn't be fixed automatically.
The Fatal level is designated to be used in case an error occurred that couldn't be stopped. A fatal error usually results in a inconsistent or inperceivable application state.
A message can contain place holders that are filled with the additional
parameters. The ILogTarget implementation may treat the
options as they want.
Example for a message with parameters:
logger.fatal("A: {0} is B: {1}", "Hello", "World");
// A: Hello is B: World
Parameters
message:* — Message that should be logged.
| |
parameters:Array (default = null) — List of parameters.
|
| info | () | method |
public function info(message:*, parameters:Array = null):voidLogs a message for notification purposes.
Notification messages should be messages that highlight interesting informations about what happens in the the application.
A message can contain place holders that are filled with the additional
parameters. The ILogTarget implementation may treat the
options as they want.
Example for a message with parameters:
logger.info("A: {0} is B: {1}", "Hello", "World");
// A: Hello is B: World
Parameters
message:* — Message that should be logged.
| |
parameters:Array (default = null) — List of parameters.
|
| toString | () | method |
public function toString():StringString representation of the Logger.
ReturnsString |
| warn | () | method |
public function warn(message:*, parameters:Array = null):voidLogs a message for warning about a undesirable application state.
Warnings are designated to be used in case code got executed that is not desirable for performance, memory or clarity reasons but didn't result in any error.
A message can contain place holders that are filled with the additional
parameters. The ILogTarget implementation may treat the
options as they want.
Example for a message with parameters:
logger.warn("A: {0} is B: {1}", "Hello", "World");
// A: Hello is B: World
Parameters
message:* — Message that should be logged.
| |
parameters:Array (default = null) — List of parameters.
|