All the components of the Onegini Mobile Security Platform use the same logging mechanism. The logging framework used by the components is Log4j2.
Configuring logging level
In order to configure logging level for a particular logger, the
JAVA_OPTS environment variable should be used.
The syntax of setting a logging level is as follows:
x2are to be replaced with the logger names
y2are to be replaced by the logging levels
The logger name can be a package name or a fully qualified class name.
The logging level is one of the standard Log4j2 logging levels:
Setting logging level of all Onegini classes to
Default logging levels
The following list shows the logging levels that are used by default in the Onegini Token Server
logging.level.org.opensaml.saml2.metadata=WARN logging.level.org.springframework=INFO logging.level.org.hibernate=WARN logging.level.com.onegini=WARN logging.level.com.innovation_district=WARN
When no logging level is configured for a package or class, Log4j2 uses the logging level
Setting logging level with docker-compose
Docker compose allows to set environment variables for docker containers. Using this approach the default logging levels can be overridden:
token-server-engine: image: snapshot.onegini.com/onegini/token-server-engine:snapshot environment: - JAVA_OPTS="-Dlogging.level.org.springframework=INFO -Dlogging.level.com.onegini=WARN"