Class: Logger

Logger Class

Namespace

ITHit
Provides static methods for logging.

Methods

static ITHit.Logger.AddListener(fHandler, iLogLevel)

AddListener
Adds log listener.
Name Type Description
fHandler ITHit.Logger~EventHandler Handler function.
iLogLevel number Log level messages capturing.

static ITHit.Logger.RemoveListener(fHandler)

RemoveListener
Removes log listener.
Name Type Description
fHandler ITHit.Logger~EventHandler Handler function.

static ITHit.Logger.WriteMessage(sMessage, iLogLevel)

WriteMessage
Writs a message to log with a specified log level. Default log level is ITHit.LogLevel#Info
Name Type Description
sMessage string Message to be logged.
iLogLevel number Logging level.
Throws:
ITHit.Exceptions.LoggerException Function was expected as log listener.

Type Definitions

EventHandler()

EventHandler
Handler function called when event is trigger.