debugLoggerUtil
A simple utility module for debug logging.
debugLoggerUtil.log(warn, "test")
Functions
toggleLoggingEnabledGlobal
debugLoggerUtil.
toggleLoggingEnabledGlobal
(
toggle:
boolean
) →
(
)
Toggles if logging is enabled or not globally.
debugLoggerUtil.toggleLoggingEnabledGlobal(false)
debugLoggerUtil.log(warn, "test") -- Doesn't do anything
toggleLoggingEnabled
debugLoggerUtil.
toggleLoggingEnabled
(
toggle:
boolean
) →
(
)
Toggles if logging is enabled or not for the script.
debugLoggerUtil.toggleLoggingEnabled(false)
debugLoggerUtil.log(warn, "test") -- Doesn't do anything
-- In another script..
debugLoggerUtil.log(warn, "123") -- Works
log
debugLoggerUtil.
log
(
logFunction:
(
...any
)
→
(
)
,
...:
any
) →
(
)
Calls logFunction
passing in ...
to it -- if logging is not enabled, nothing happens.
NOTE
If logging is toggled off for the script (in which this method is called in) or logging is toggled off globally, then this method will not anything.