Skip to content

Logger

Description

The logger module can be used to dynamically change the log level and reduce or increase the amount of messages logged by changing topics also known as namespaces to either silent or noisy. Furthermore, each topic can be set to a specific log level, where each log level offers increased verbosity. This module is very much optional but offers the ability to change the log level on the fly.

API

Get Topic List

This endpoint returns a list of all available topics and their current setting.

GET
/api/v1/logger

Access

This endpoint requires read permission for the resource logger.

Response

NameDescription
namespace
string
The namespace parameter, also called `topic`. This acts as a unique identifier. Each topic can be changed independently if required.
silent
boolean
Whenever the messages produced under this topic are logged or not.
level
stringenum
The available log level of the current logger implementation.
Possible values: error, warn, info, verbose, debug, trace, protocol

Update all Topics

Updates all topics based on the request body. Can be used to quickly activate or deactivate logging for certain topics and change the log-level for all topics.

PUT
/api/v1/logger

Access

This endpoint requires update permission for the resource logger.

Request Body

NameDescription
namespaces
arraystringoptional
The namespaces to activate. Topics not present in this list will be set to silent. If the key is omitted, all topics will be set to log messages.
level
stringoptionalenum
The level set in request will be applied to all topics.
Possible values: error, warn, info, verbose, debug, trace, protocol

Response

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.

Get specific Topic

This endpoint returns a single namespace if available and can be used to check the individual namespace settings.

GET
/api/v1/logger/:namespace

Access

This endpoint requires read permission for the resource logger.

URL Parameter

NameDescription
namespace
string
The namespace or topic parameter that identifies a topic. To get a list of all available topics, please use the endpoint that lists all topics and their settings.

Response

NameDescription
silent
boolean
Whenever the messages produced under this topic are logged or not.
level
stringenum
The available log level of the current logger implementation.
Possible values: error, warn, info, verbose, debug, trace, protocol

Update specific Topic

Updates a specific topic and either changes the log level or changes whenever the topic should be logged at all.

PUT
/api/v1/logger/:namespace

Access

This endpoint requires update permission for the resource logger.

URL Parameter

NameDescription
namespace
string
The namespace or topic parameter that identifies a topic. To get a list of all available topics, please use the endpoint that lists all topics and their settings.

Request Body

NameDescription
silent
boolean
Whenever the messages produced under this topic are logged or not.
level
stringenum
The available log level of the current logger implementation.
Possible values: error, warn, info, verbose, debug, trace, protocol

Response

This endpoint simply returns Status 204 to indicate a successful operation and to save bandwidth.