Core
Write Protocols v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

log #

The context.log object exposes functions used to send messages to Kuzzle's logging system.

Log levels are assigned to each exposed log function, corresponding to the log priority. The lower the log level, the higher its priority.

Levels above the threshold configued in the logs section of Kuzzle's configuration file are ignored.


error #

Priority #

0 (highest priority)

Example #

Copied to clipboard!
context.log.error('error message');

warn #

Priority #

1

Example #

Copied to clipboard!
context.log.warn('warning message');

info #

Priority #

2

Example #

Copied to clipboard!
context.log.info('info message');

verbose #

Priority #

3 (ignored by default)

Example #

Copied to clipboard!
context.log.verbose('verbose message');

debug #

Priority #

4 (ignored by default)

Example #

Copied to clipboard!
context.log.debug('debug message');

silly #

Priority #

5 (lowest priority, usually ignored)

Example #

Copied to clipboard!
context.log.silly('silly message');