Home

log-ls provides two utilities: Log for sending messages to a printer and Config for loading data from a json file.

log-ls provides a simple logging interface that makes it easy to record formatted log messages to one or more log printer:

package
{
    import loom.Application;
    import pixeldroid.util.Log;
    import pixeldroid.util.LogLevel;
    public class LogTest extends Application
    {
        private const _logName:String = getFullTypeName();
        override public function run():void
        {
            Log.level = LogLevel.INFO;
            Log.info(_logName, function():String { return _logName +' is running!'; });
        }
    }
}

Log messages are wrapped in a function closure to delay their execution until actually required.

Log.info('MyLogger', function():String { return 'message to log only if log level is INFO'; });

The default printer logs messages to the console.

A file printer is also provided.

The multi-printer can tee log messages to multiple targets.

Custom printers can be written against the Printer api.

log-ls 2018 pixeldroid
https://github.com/pixeldroid/log-ls
generated with lsdoc v1.0.0 (https://github.com/pixeldroid/lsdoc)