Module: Logger
The Logger Client supports very efficient and configurable run-time logging to the Central Logger. Logging has a small performance overhead, so developers can liberally instrument their code with log messages for debugging and diagnostics. By default, only error and warning messages are captured by the Logger, with the other message types (e.g., log, info, debug) disabled. Which message types are enabled or disabled is fully controlled from the Central Logger - this means developers can fully instrument their code once and dynamically enable and disable logging later, as needed, for debugging or field support.
The Finsemble team uses the Central Logger to capture log message for field support. Finsemble customers, building their own Finsemble applications, have the option to do the same.
The Logger Client wraps all console logging (e.g., console.error
, console.log
) so these message can also be captured and viewed in the Central Logger. Console logging is never disabled locally. For better performance, we recommend most of your code's instrumentation be based on the Logger Client (e.g., FSBL.Clients.Logger.debug(...)
instead of the console.debug(...)
).
Using the Logger is similar to using the browser's console for logging (e.g., console.error
or console.log
), although the Logger Client is accessed through the FSBL object as shown in the examples below.
FSBL.Clients.Logger.error("an error message", anErrorObject);
FSBL.Clients.Logger.warn("a warning message", object1, object2, object3);
FSBL.Clients.Logger.log("logging message");
FSBL.Clients.Logger.info("logging message");
FSBL.Clients.Logger.log("log message");
FSBL.Clients.Logger.debug("debug message");
Functions
debug
▸ debug(...args
): void
Log a dev debug message.
FSBL.Clients.Logger.debug("some message", parm1, parm2);
Parameters
Name | Type |
---|---|
...args | any [] |
Returns
void
error
▸ error(...args
): void
Log a dev error message.
FSBL.Clients.Logger.error("some message", parm1, parm2);
Parameters
Name | Type |
---|---|
...args | any [] |
Returns
void
info
▸ info(...args
): void
Log a dev info message.
FSBL.Clients.Logger.info("some message", parm1, parm2);
Parameters
Name | Type |
---|---|
...args | any [] |
Returns
void
log
▸ log(...args
): void
Log a dev log message.
FSBL.Clients.Logger.log("some message", parm1, parm2);
Parameters
Name | Type |
---|---|
...args | any [] |
Returns
void
verbose
▸ verbose(...args
): void
Log a dev verbose message (an extra level of verbose-debug output).
FSBL.Clients.Logger.verbose("some message", parm1, parm2);
Parameters
Name | Type |
---|---|
...args | any [] |
Returns
void
warn
▸ warn(...args
): void
Log a dev warning message.
FSBL.Clients.Logger.warn("some message", parm1, parm2);
Parameters
Name | Type |
---|---|
...args | any [] |
Returns
void