Package | com.luminicbox.log |
Class | public class Logger |
import com.luminicbox.log.
var log:Logger = new Logger( "myLogger" );
log.addPublisher( new TracePublisher() );
// ...
log.debug( "debug message" );
log.info( "info message" );
// ...
var xml:XML = new XML( <note><to>John</to><from>Dana</from><heading>Reminder</heading><body>Don´t forget the milk</body></note> );
log.debug( xml );
Method | Defined by | ||
---|---|---|---|
Logger(logId:String)
Creates a new Logger instance.
The logId parameter is optional. | Logger | ||
addPublisher(publisher:IPublisher):void
Adds a Publisher to the publishers collection.
| Logger | ||
debug(argument:Object):void
Logs an object or message with the DEBUG level.
| Logger | ||
error(argument:Object):void
Logs an object or message with the ERROR level.
| Logger | ||
fatal(argument:Object):void
Logs an object or message with the FATAL level.
| Logger | ||
getPublishers():Array
Return the publishers collection.
| Logger | ||
info(argument:Object):void
Logs an object or message with the INFO level.
| Logger | ||
log(argument:Object):void
Logs an object or message with the LOG level.
| Logger | ||
removePublisher(publisher:IPublisher):void
Removes a Publisher from the publishers collection.
| Logger | ||
Sets the lowest required level for any message.
Any message that have a level that is lower than the supplied value will be ignored. This is the most basic form of filter. | Logger | ||
warn(argument:Object):void
Logs an object or message with the WARN level.
| Logger |
Logger | () | constructor |
public function Logger(logId:String)
Creates a new Logger instance.
The logId parameter is optional. It identifies the logger and all messages to the publisher will be sent with this ID.
logId:String — String (optional)
|
addPublisher | () | method |
public function addPublisher(publisher:IPublisher):void
Adds a Publisher to the publishers collection. The supplied publisher must implement the IPublisher interface
There can only be one instance of each Publisher.
publisher:IPublisher |
debug | () | method |
public function debug(argument:Object):void
Logs an object or message with the DEBUG level.
Parametersargument:Object — The message or object to inspect.
|
error | () | method |
public function error(argument:Object):void
Logs an object or message with the ERROR level.
Parametersargument:Object — The message or object to inspect.
|
fatal | () | method |
public function fatal(argument:Object):void
Logs an object or message with the FATAL level.
Parametersargument:Object — The message or object to inspect.
|
getPublishers | () | method |
public function getPublishers():Array
Return the publishers collection.
ReturnsArray |
info | () | method |
public function info(argument:Object):void
Logs an object or message with the INFO level.
Parametersargument:Object — The message or object to inspect.
|
log | () | method |
public function log(argument:Object):void
Logs an object or message with the LOG level.
Parametersargument:Object — The message or object to inspect.
|
removePublisher | () | method |
public function removePublisher(publisher:IPublisher):void
Removes a Publisher from the publishers collection. A new instance of that kind of publisher can be supplied.
Parameterspublisher:IPublisher |
setLevel | () | method |
public function setLevel(level:Level):void
Sets the lowest required level for any message.
Any message that have a level that is lower than the supplied value will be ignored.
This is the most basic form of filter.
level:Level |
warn | () | method |
public function warn(argument:Object):void
Logs an object or message with the WARN level.
Parametersargument:Object — The message or object to inspect.
|