Static methods

staticaddTarget(target:AbstractLoggerTarget):Int

Adds a log target to the Logger

Parameters:

target

The AbstractLoggerTarget implementation

staticcallStack(?pos:Null<PosInfos>):Void

staticclear():Void

Executes clear() on all targets. The implementation of clear() is up to the target.

@:value({ label : "default" })staticcount(label:String = "default", ?pos:Null<PosInfos>):Int

Writes the number of times that count() has been invoked with the same label. Call Logger.countReset(label) to reset the count.

Parameters:

label

Returns:

The total count for label

@:value({ label : "default" })staticcountReset(label:String = "default", ?pos:Null<PosInfos>):Void

Resets a count with the defined label

Parameters:

null

label

@:value({ logLevel : LogLevel.Info })staticcreate(logLevel:LogLevel = LogLevel.Info, ?id:String):LoggerImpl

Creates a LoggerImpl instance

Parameters:

logLevel

The maximum LogLevel of the LoggerImpl instance

id

The optional id of this specific LoggerImpl instance. If defined, it'll be added to the log messages

Returns:

LoggerImpl

staticdebug(v:Dynamic, ?customMessageObject:Dynamic, ?pos:Null<PosInfos>):Void

Logs a message in all targets with LogLevel.Debug

Parameters:

v

The message to be logged

pos

PosInfos when debug is enabled

staticdisableAllTargets():Void

Disables all targets

staticenableAllTargets():Void

Enables all targets

staticerror(v:Dynamic, ?customMessageObject:Dynamic, ?pos:Null<PosInfos>):Void

Logs a message in all targets with LogLevel.Error

Parameters:

v

The message to be logged

pos

PosInfos when debug is enabled

staticfatal(v:Dynamic, ?customMessageObject:Dynamic, ?pos:Null<PosInfos>):Void

Logs a message in all targets with LogLevel.Fatal

Parameters:

v

The message to be logged

pos

PosInfos when debug is enabled

staticgetTargetsByClass(targetClass:Class<AbstractLoggerTarget>):Array<AbstractLoggerTarget>

Returns an array of targets with the given class

Parameters:

targetClass

The class of the requested targets

Returns:

Array The array of targets. Empty if no target was found.

staticinfo(v:Dynamic, ?customMessageObject:Dynamic, ?pos:Null<PosInfos>):Void

Logs a message in all targets with LogLevel.Info

Parameters:

v

The message to be logged

pos

PosInfos when debug is enabled

@:value({ captureHaxeTrace : false, logLevel : LogLevel.Info })staticinit(logLevel:LogLevel = LogLevel.Info, captureHaxeTrace:Bool = false):Void

Initializes the Logger.

Parameters:

logLevel

Default log level. Any messages with higher level than this will not be logged in targets

captureHaxeTrace

If true, it captures haxe.Log.trace(), and messages will be logged with LogLevel.Info in all targets

staticremoveTarget(target:AbstractLoggerTarget):Bool

Removes a logger target

Parameters:

null

target

@:value({ label : "default" })statictimerLog(label:String = "default", ?pos:Null<PosInfos>):Void

@:value({ label : "default" })statictimerStart(label:String = "default", ?pos:Null<PosInfos>):Void

@:value({ label : "default" })statictimerStop(label:String = "default", ?pos:Null<PosInfos>):Void

staticverbose(v:Dynamic, ?customMessageObject:Dynamic, ?pos:Null<PosInfos>):Void

Logs a message in all targets with LogLevel.Verbose

Parameters:

v

The message to be logged

pos

PosInfos when debug is enabled

staticwarning(v:Dynamic, ?customMessageObject:Dynamic, ?pos:Null<PosInfos>):Void

Logs a message in all targets with LogLevel.Warning

Parameters:

v

The message to be logged

pos

PosInfos when debug is enabled