Custom Log Level

There are four logging levels in Zuplo:

  • error
  • warn
  • info
  • debug

If the log level is set to debug - all entries are logged. If it is set to warn, only warn and error events are logged. Zuplo defaults the log level to debug (everything) for working-copy environments and error for everything else. You can override this by setting an environment variable called ZUPLO_LOG_LEVEL to one of the values above.

:::warning The log levels are case sensitive - they must be entered correctly, in lower case for logging to work. :::

The log levels map to the different methods on context.log, e.g.

context.log.error("error level event");
context.log.warn("debug level event");
context.log.info("info level event");
context.log.log("'log' is also an info level event");
context.log.debug("debug level event");

Was this article helpful?

Do you have any questions?Contact us
Check out ourproduct changelog