Logging configuration deprecated

Configuring logging for OX App Suite Middleware.

This article describes how to configure the OX App Suite Middleware logging.

Prerequisites

  • An active shell to a running Toolkit Container within the cluster. See Starting.
  • Access to the OX App Suite Middleware's Admin REST API.

Commands

To configure the OX App Suite Middleware logging, use the mwctl logconf tool with its various sub commands.


Note:

All mwctl logconf sub commands operate on the OX App Suite Middleware Admin REST API and therefore require admin credentials when invoked.

By default, the commands operate on loggers of all available OX App Suite Middleware containers that are discovered in the current namespace. This discovery happens through the default app=core-mw Kubernetes label.


Tip:

You can also use the --label flag to define a custom label-selector used for autodiscovery.


Tip:

You can also use the --urls flag to specify a list of URLs or a single URL of hosts to get the loggers.

Logger

The mwctl logconf logger command helps to set, change, and delete various log levels of the OX App Suite Middleware.

Getting loggers

Use the get subcommand to list all system loggers and their current log level:

mwctl logconf logger get

Use the --contextid (or -c) flag to only show loggers configured for a specific context:

mwctl logconf logger get -c <CONTEXT-ID>

The flags --userid (-i) and --session (-s) can be used to only show loggers related to a specific user or session-ID.

mwctl logconf logger get -c <CONTEXT-ID> -i <USER-ID>
mwctl logconf logger get -s <SESSION-ID>

Setting loggers


Note:

After restarting the OX App Suite Middleware, any changes made to the log levels will reset.

Use the set subcommand to set a log level for a system logger or for a context-, user-, or session-related logger.

mwctl logconf logger set <LOGGER>=<LOGLEVEL>

Available log levels are:

  • OFF
  • ERROR
  • WARN
  • INFO
  • DEBUG
  • TRACE
  • ALL

Example: Setting the loglevel of a systemlogger:
mwctl logconf logger set com.openexchange.login.internal.LoginPerformer=DEBUG

Tip:

You can also change multiple loggers with a single command by specifying each logger as its own argument.

The set subcommand also allows you to create and modify context, user, or session-based loggers.

Use the --contextid (or -c) flag to create or set a logger for a specific context ID. Additionally, the --userid (-i) and --session (-s) flags can set or create a logger for a particular user or session ID.

mwctl logconf logger set -c <CONTEXT-ID> <LOGGER>=<LOGLEVEL> 
mwctl logconf logger set -c <CONTEXT-ID> -i <USER-ID> <LOGGER>=<LOGLEVEL> 
mwctl logconf logger set -s <SESSION-ID> <LOGGER>=<LOGLEVEL> 

Deleting loggers

Use the delete subcommand to reset the log level for a system logger or to remove a context-, user-, or session-related logger.

mwctl logconf logger delete -c <CONTEXT-ID> <LOGGER>
mwctl logconf logger delete -c <CONTEXT-ID> -i <USER-ID> <LOGGER>
mwctl logconf logger delete -s <SESSION-ID> <LOGGER>

Tip:

If you omit specifying a logger, all loggers within the specified scope will be reset or deleted.

See also

See "mwtctl logconf" for detailed documentation of the logconf subcommand.