Class: Logger

Logger Class

Namespace

ITHit

Provides static methods for logging.

Methods

staticITHit.Logger.AddListener(fHandler, iLogLevel)

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

staticITHit.Logger.RemoveListener(fHandler)

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

staticITHit.Logger.WriteMessage(sMessage, iLogLevel)

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()

Handler function called when event is trigger.