Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue
idrDEVDONE

Product Version2022 Spring
Report Note
AssigneeAntje

Resources & Remarks

Modification History

NameDateProduct VersionAction
Antje16 DEC 20212022 SpringPage created & written.
Agnieszka20 DEC 20212022 SpringrLANG



Excerpt

Configure the logging provided by individual yuuvis® Momentum services.

...

Logs provide information on processes within individual instances of services that are running in the yuuvis® Momentum cluster. Their outputs are managed and provided via Kubernetes. The log level can be configured in order to show more or less process details. The configuration can be adjusted during the installation process, but also for systems that are already in operation.

...

The logging can be configured hierarchically by means of the underlying java package structure. In this article, the placeholder <packageName> is used. If it is replaced by a concrete specific class (e.g., com.os.services.package.subpackage.MyFirstExampleClass), only the configuration for the logging provided by this class is affected. If it is replaced by a package name at a higher hierarchical level (e.g., com.os.services), all classes included in the package are affected.

...

In the individual service configuration YAML files, the log level can be configured during the installation. The desired log level can be specified in the value for the JAVA_OPTS parameter via -D as shown in the example code block below.

...

Code Block
languageyml
logging.level.com.os.services: DEBUG

The target service has to be refreshed or restarted in order to activate the new logging configuration.

'/*/manage/loggers/**' Endpoints

The logger management endpoints are accessible only for users with specific authorization as defined in the authentication-prod.yml file and controlled by the AUTHENTICATION Service.

...

Retrieving Information on Loggers

It is possible to retrieve an overview of all loggers that are defined for a specific service via the GET endpoint http://<ip>:<port>/manage/loggers. For each logger, the current log level is displayed as shown in the example response body.

Code Block
languageyml
titleExample response body
collapsetrue
{
    "levels": [
        "OFF",
        "ERROR",
        "WARN",
        "INFO",
        "DEBUG",
        "TRACE"
    ],
    "loggers": {
        "ROOT": {
            "configuredLevel": "WARN",
            "effectiveLevel": "WARN"
        },
        "application": {
            "configuredLevel": "WARN",
            "effectiveLevel": "WARN"
        },
        "auditEntryAggregator": {
            "configuredLevel": null,
            "effectiveLevel": "WARN"
        }
}

...

Updating Log Levels

In order to set a log level at runtime, it can be specified in JSON format as shown in the example below and sent as request body to the POST endpoint http://<ip>:<port>/manage/loggers/<packageName>.

Code Block
languageyml
titleExample request body
collapsetrue
{"configuredLevel":"DEBUG"}

The change applies immediately to the service instance running on the target port has to be refreshed or restarted in order to activate the new logging configurationAfter a restart of this service, the log level is reset to the value configured in a configuration file as described before.

Summary

The configuration of log levels can be adjusted in the service deployment during the installation. For a system in operation, the logging can be configured in configuration files or via an endpoint.

Info
iconfalse

Read on

Section


Column
width25%

Configuring Services using Profiles

Insert excerpt
Configuring Services using Profiles
Configuring Services using Profiles
nopaneltrue
 Keep reading


Column
width25%

Health Check for Services

Insert excerpt
Health Check for Services
Health Check for Services
nopaneltrue
 Keep reading


Column
width25%
Service

Monitoring via Prometheus and Graphana

Insert excerpt
Service Monitoring via Prometheus and GraphanaService
Monitoring via Prometheus and Graphana
nopaneltrue
 Keep reading