Class: DuDebugLog

DuDebugLog

A logger for debugging purposes: writes debug messages to a file, with date and type

new DuDebugLog(pathOrFile, clear, logLevel, enabled)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 693
Constructs a new debug logger
Name Type Default Description
pathOrFile string | File optional The log file. By default, located next to the script settings file (if constructed after DuESF.init()).
clear boolean true optional Whether to clear the previous log file before starting
logLevel DuDebug.LogLevel DuDebug.LogLevel.DEBUG optional The log level.
enabled boolean DuESF.debug optional true to enable the log and start recording
Properties:
Name Type Description
running boolean true if the timer is running, false if it is stopped.

Members

staticDuDebugLog.enabledDuDebug.LogLevel

true to enable the log and record logs.
Default Value:
  • DuESF.debug

static,readonlyDuDebugLog.fileFile

The log file.

staticDuDebugLog.levelDuDebug.LogLevel

The log level.
Default Value:
  • DuDebug.LogLevel.DEBUG

Methods

checkTimer(message, level){int}

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 856
Checks the time elapsed since the timer has started
If the timer is not running, it will be started.
Name Type Default Description
message string A message to display in the log
level DuDebug.LogLevel DuDebug.LogLevel.DEBUG optional The level of the message
Returns:
Type Description
int The time elapsed in milliseconds

log(message, level)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 766
Logs a message
Name Type Default Description
message string The message to log
level DuDebug.LogLevel DuDebug.LogLevel.DEBUG optional The level of the message

startTimer(message, level)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 790
Starts the debugger timer.
Name Type Default Description
message string optional A message to display in the log
level DuDebug.LogLevel DuDebug.LogLevel.VERBOSE optional The level of the message

stopTimer(message, level)

D:/DEV_SRC/RxOT/DuPSF/tools/output/DuPSF.jsxinc, line 820
Stops the debugger timer.
Name Type Default Description
message string optional A message to display in the log
level DuDebug.LogLevel DuDebug.LogLevel.DEBUG optional The level of the message