Skip to content

Commit

Permalink
config: Allow configuration of logging levels
Browse files Browse the repository at this point in the history
This patch parametrizes a few entries in 'ovirt-engine.xml.in'
to make logging levels configurable with 'engine.conf.d/*.conf'
drop-in config files.

Signed-off-by: Marcin Sobczyk <msobczyk@redhat.com>
  • Loading branch information
tinez authored and mwperina committed Jul 25, 2022
1 parent 43926a8 commit 0ea5633
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions packaging/services/ovirt-engine/ovirt-engine.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -779,3 +779,10 @@ ENGINE_LOG_TO_SYSLOG=true
#
# Whether we send ui.log to SYSLOG when SYSLOG_HANDLER_ENABLED=true
UI_LOG_TO_SYSLOG=false

#
# Logging levels
ROOT_LOG_LEVEL="INFO"
KEYCLOAK_LOG_LEVEL="INFO"
CORE_BLL_LOG_LEVEL="INFO"
ORG_OVIRT_LOG_LEVEL="INFO"
8 changes: 4 additions & 4 deletions packaging/services/ovirt-engine/ovirt-engine.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@

<!-- Loggers for the engine: -->
<logger category="org.ovirt" use-parent-handlers="false">
<level name="INFO"/>
<level name="{{ config.get('ORG_OVIRT_LOG_LEVEL') }}"/>
<handlers>
<handler name="ENGINE"/>
<handler name="ovirt-logger"/>
Expand All @@ -248,7 +248,7 @@
{% if config.getboolean('KEYCLOAK_BUNDLED') %}
<!-- Loggers for the Keycloak: -->
<logger category="org.keycloak" use-parent-handlers="false">
<level name="INFO"/>
<level name="{{ config.get('KEYCLOAK_LOG_LEVEL') }}"/>
<handlers>
<handler name="KEYCLOAK"/>
{% if config.getboolean('SYSLOG_HANDLER_ENABLED') and config.getboolean('KEYCLOAK_BUNDLED') %}
Expand All @@ -269,14 +269,14 @@
</handlers>
</logger>
<logger category="org.ovirt.engine.core.bll">
<level name="INFO"/>
<level name="{{ config.get('CORE_BLL_LOG_LEVEL') }}"/>
</logger>
<logger category="org.ovirt.engine.core.dal.dbbroker.PostgresDbEngineDialect$PostgresJdbcTemplate">
<level name="WARN"/>
</logger>

<root-logger>
<level name="INFO"/>
<level name="{{ config.get('ROOT_LOG_LEVEL') }}"/>
<handlers>
<handler name="ovirt-logger"/>
<handler name="SERVER"/>
Expand Down

0 comments on commit 0ea5633

Please sign in to comment.