laptop-codeFor developers

circle-info

The for developers section within each feature gives more tech heavy information of configuring, extending or altering Valtimo via the codebase.

In the backend- and the frontend codebase configurations can be done in order to enable storage, cleanup and retention and enabling the menu item for viewing the logs.

Backend

Enabling storage

To enable storing the logs in the Valtimo database, a custom database appender has been implemented. This appender has to be configured in the logback-spring.xml configuration file:

<configuration scan="true">
    <include resource="config/logging/logback/valtimo-defaults.xml" />
    <include resource="org/springframework/boot/logging/logback/console-appender.xml" />
    <include resource="config/logging/logback/valtimo-database-appender.xml" />
    ...
    <root level="${logback.loglevel:-INFO}">
        <appender-ref ref="CONSOLE"/>
        <appender-ref ref="VALTIMODBASYNC"/>
    </root>
</configuration>

REST client logging

Valtimo includes a LoggingRestClientCustomizer that automatically intercepts all outgoing HTTP requests made via Spring's RestClient. When an external call returns an error status, the interceptor throws an HttpClientErrorException with the status code and status text.

Detailed request and response information (method, URI, headers, and bodies) is logged at DEBUG level only. To enable these detailed logs, add the following to your logback-spring.xml:

Alternatively, this can be configured via an environment variable without modifying logback-spring.xml:

Or as a Spring Boot application property:

circle-exclamation

Cleanup and retention

The following application properties can be set to configure the cleanup job time and the log retention period:

Frontend

Enabling the menu item

To show the logging menu item, the following property should be present in the Angular environment configuration:

Last updated