Just a second...

Logging in JavaScript

The JavaScript® client library logs messages to the console.

Log levels

Events are logged at different levels of severity. The log levels, ordered from most severe to least severe, are as follows:

Table 1. Log levels
Level Description
error Events that indicate a failure.
warn Events that indicate a problem with operation.
info Significant events.
debug Verbose logging. Not usually enabled for production.
trace High-volume logging of interest only to Push Technology Support. Push Technology Support may occasionally ask you to enable this log level to diagnose issues.

Configuring logging in the JavaScript client

You can use the JavaScript API to enable and configure logging at runtime.
diffusion.log(level)
To disable logging at runtime, set the level to silent.
diffusion.log('silent')
Note: Do not enable logging in your production clients. Use logging only during development of your clients.