Invox Dictation SDK Version:

Logger Functions


Functions to configure and use the INVOX Logger. For an overview of how the logging system works, see the Browser Logs section.

Log levels

LevelValueDescription
FATAL0Critical errors that may cause the application to stop.
ERROR1Runtime errors or unexpected conditions.
WARN2Potentially harmful situations.
INFO3General informational messages.
DEBUG4Detailed information for debugging.
TRACE5Fine-grained tracing information.

Log targets

TargetDescription
LOCALSTORAGEStores log messages in the browser's Local Storage (1 MB limit). Sent to the server on login, logout, or when the limit is reached.
CONSOLEDisplays log messages in the browser console. Can be combined with other targets.
ONLY_SERVERSends each log message directly to the server without storing locally. Takes precedence over LOCALSTORAGE.

ChangeLogLevel

FunctionDescriptionParametersReturns
INVOX.ChangeLogLevel(level)Changes the logger verbosity level. Messages below the set level will be filtered out.LogLevelvoid
INVOX.ChangeLogLevel("INFO");    // Show INFO and above (INFO, WARN, ERROR, FATAL)
INVOX.ChangeLogLevel("DEBUG");   // Show DEBUG and above

ChangeLogTarget

FunctionDescriptionParametersReturns
INVOX.ChangeLogTarget(targets)Sets where log messages are sent.Array<LogTarget>void
// Log to browser console only
INVOX.ChangeLogTarget(["CONSOLE"]);

// Log to both Local Storage and browser console
INVOX.ChangeLogTarget(["LOCALSTORAGE", "CONSOLE"]);

// Send directly to server
INVOX.ChangeLogTarget(["ONLY_SERVER"]);

ChangeLogKeywordsToIgnore

FunctionDescriptionParametersReturns
INVOX.ChangeLogKeywordsToIgnore(keywords)Sets keywords to filter out from the logs. Messages containing these keywords will not be logged.Array<String>void
INVOX.ChangeLogKeywordsToIgnore(["heartbeat", "keepAlive"]);

LogTrace

FunctionDescriptionParametersReturns
INVOX.LogTrace(message)Logs a trace-level message.Stringvoid
INVOX.LogTrace("Entering function parseResults");

LogDebug

FunctionDescriptionParametersReturns
INVOX.LogDebug(message)Logs a debug-level message.Stringvoid
INVOX.LogDebug("Preparing Direct Dictation session");

LogInfo

FunctionDescriptionParametersReturns
INVOX.LogInfo(message)Logs an informational message.Stringvoid
INVOX.LogInfo("Direct Dictation session connected successfully.");

LogWarn

FunctionDescriptionParametersReturns
INVOX.LogWarn(message)Logs a warning message.Stringvoid
INVOX.LogWarn("Direct Dictation connection is recovering.");

LogError

FunctionDescriptionParametersReturns
INVOX.LogError(message)Logs an error message.Stringvoid
INVOX.LogError("Could not start the Direct Dictation session.");

LogFatal

FunctionDescriptionParametersReturns
INVOX.LogFatal(message)Logs a fatal error message.Stringvoid
INVOX.LogFatal("Unrecoverable error occurred.");