+

Search Tips   |   Advanced Search

Set Logger priority

We can configure the Logger to display only warning and error log messages.

To display only warning and error log messages, set the priority of the logger to 'warn' or 200.

WL.Logger.config({level: 'warn'}); 
var WARN = 200;
WL.Logger.config({level: WARN})

Possible string values:

'trace', 'debug', 'log', 
'info', 
'warn', 
'error', 'fatal'
'analytics'

These values are not case-sensitive, for example LOG and Log are also possible values.

Possible int values:

25  (analytics)
50  (fatal)
100 (error)
200 (warn)
300 (info)
400 (log)
500 (debug)
600 (trace)


Parent topic: Configure the MobileFirst Logger