Enabling log4j.rootLogger configuration parameter
Synopsis: By default, logger is using TRACE parameter which leads
to disk space havoc.
Fix: One can configure log4j.rootLogger to use INFO parameter
for example.
Change-Id: I3deb89306ca5259c00764e4968b0f668312c66f0
diff --git a/README.rst b/README.rst
index da9d0b4..4fa2d74 100644
--- a/README.rst
+++ b/README.rst
@@ -102,6 +102,7 @@
members:
- host: 127.0.0.1
id: 1
+ rootlogger: "INFO, CONSOLE"
control:
version: 2.2
enabled: true
diff --git a/opencontrail/config.sls b/opencontrail/config.sls
index 84998e7..502d2aa 100644
--- a/opencontrail/config.sls
+++ b/opencontrail/config.sls
@@ -34,6 +34,7 @@
/etc/ifmap-server/log4j.properties:
file.managed:
- source: salt://opencontrail/files/{{ config.version }}/config/log4j.properties
+ - template: jinja
- require:
- pkg: opencontrail_config_packages
diff --git a/opencontrail/files/2.2/config/log4j.properties b/opencontrail/files/2.2/config/log4j.properties
index 8a1fa76..126e749 100644
--- a/opencontrail/files/2.2/config/log4j.properties
+++ b/opencontrail/files/2.2/config/log4j.properties
@@ -1,6 +1,7 @@
+{%- from "opencontrail/map.jinja" import config with context %}
# Set root logger level to DEBUG and its only appender to CONSOLE
-log4j.rootLogger=TRACE, CONSOLE
+log4j.rootLogger={{ config.get('rootlogger', 'TRACE, CONSOLE') }}
log4j.error
log4j.logger.de.fhhannover.inform.irond.proc=TRACE, A1, A2
diff --git a/opencontrail/files/3.0/config/log4j.properties b/opencontrail/files/3.0/config/log4j.properties
index 8a1fa76..126e749 100644
--- a/opencontrail/files/3.0/config/log4j.properties
+++ b/opencontrail/files/3.0/config/log4j.properties
@@ -1,6 +1,7 @@
+{%- from "opencontrail/map.jinja" import config with context %}
# Set root logger level to DEBUG and its only appender to CONSOLE
-log4j.rootLogger=TRACE, CONSOLE
+log4j.rootLogger={{ config.get('rootlogger', 'TRACE, CONSOLE') }}
log4j.error
log4j.logger.de.fhhannover.inform.irond.proc=TRACE, A1, A2
diff --git a/tests/pillar/control.sls b/tests/pillar/control.sls
index 0ae7584..1800c00 100644
--- a/tests/pillar/control.sls
+++ b/tests/pillar/control.sls
@@ -63,6 +63,7 @@
- host: 127.0.0.1
id: 3
list_optimization_enabled: true
+ rootlogger: "INFO, CONSOLE"
control:
version: 3.0
enabled: true