Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 2.42 KB

logging.md

File metadata and controls

61 lines (48 loc) · 2.42 KB

Logging in OpenWhisk

Default Logging Provider

OpenWhisk uses Logback as default logging provider via slf4j.

Logback can be configured in the configuration file logback.xml.

Besides other things this configuration file defines the default log level for OpenWhisk. Akka Logging inherits the log level defined here.

Enable debug-level logging for selected namespaces

For performance reasons it is recommended to leave the default log level on INFO level. For debugging purposes one can enable DEBUG level logging for selected namespaces (aka special users). A list of namespace ids can be configured using the nginx_special_users property in the group_vars/all file of an environment.

Example:

nginx_special_users:
- 9cfe57b0-7fc1-4cf4-90b6-d7e9ea91271f
- 08f65e83-2d12-5b7c-b625-23df81c749a9

Using JMX to adapt the loglevel at run-time

One can alter the log level of a single component (Controller or Invoker) on the fly using JMX.

Example for using jmxterm to alter the log level

  1. Create a command file for jmxterm
open <targethost>:<jmx port> -u <jmx username> -p <jmx password>
run -b ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator getLoggerLevel ROOT
run -b ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator setLoggerLevel ROOT DEBUG
run -b ch.qos.logback.classic:Name=default,Type=ch.qos.logback.classic.jmx.JMXConfigurator getLoggerLevel ROOT
close
  1. Issue the command with the created file like this:
java -jar jmxterm-1.0.0-uber.jar -n silent < filename