OpenTok.Logger

public class Logger

Helper class that allows setting log level used by the SDK optionally providing a custom callback for log handling. This class provides a safer way manage native logging than directly invoking the native C API via DllImport. WARNING: DO call Disable() before closing the application to avoid closing exceptions.

enum Level

Level of log messages. Level 0 is reserved for Disabled.

Name Value Description
Error 1
Warn 2
Info 3
Debug 4

Methods

Name Description
(static) Disable() Disables logging.
(static) Enable(level, addTimestamps, userCallback)
LogCallback(message) → {delegate void}

(static) Disable()

Disables logging.

(static) Enable(level, addTimestamps, userCallback)

Parameters:
Name Type Description
level Level Minimum level logged.
addTimestamps bool Add a timestamp to the start of each log line.
userCallback LogCallback User provided callback to handle the logs instead of the standard output.

LogCallback(message) → {delegate void}

Parameters:
Name Type Description
message string The log message
Returns:

delegate void