/
Example: Logging configuration to standard out

Example: Logging configuration to standard out

This article gives an example log configuration file and explains it roughly.

To activate this file, copy it to the directory containing all other configurations for tia Content Server Core and set the parameter logging.config with path and file name of this file.

 

Logging configuration to standard out

This example demonstrates how to set up tia Content Server to standard out.

When in deployment as container, tia Content Server Core logs by default to standard out, which is typically collected by helping tools like Grafana Promtail, or even the container runtime to present on demand (e.g. docker logs <container> ).

 

The CONSOLE appender (line 4-8) defines

  • the encoder, the (enriched) format of the application log output is specified (line 20 to 22).

The default log file pattern is explained in this knowledge base article: https://kgs-software.atlassian.net/wiki/spaces/SUPPORT/pages/3661987841

 

The root tag is the main point to load these specifications. Here,

  • the default root log level is set, as well as

  • the appender bound for logging.

The root log level can be set as well by application-wide parameter logging.level.root.

It is possible to bind declare and bind multiple appenders in the logging configuration file.

 

Example logging configuration file

<configuration> <!--Activate this to log also in tomcat std out--> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%32.32X{traceId}/%16.16X{spanId}] [%.-1p] [%20.20thread] %70.70(%30.30logger{10}.%M \(%4L\) ): %m%n</pattern> </encoder> </appender> <root level="INFO"> <appender-ref ref="CONSOLE" /> </root> </configuration>

 

Related content

Example: Logging configuration for rolling log file
Example: Logging configuration for rolling log file
More like this
Example: Logging configuration for JSON logging
Example: Logging configuration for JSON logging
More like this
Configuration of logging framework in container deployment
Configuration of logging framework in container deployment
More like this
Configuration of logging framework in WAR file deployments.
Configuration of logging framework in WAR file deployments.
More like this
Example: Logging configuration for Email notification
Example: Logging configuration for Email notification
More like this
Logging for tia® server components
Logging for tia® server components
More like this