config: Move persistent logging configuration to separate config file 06/202906/5 accepted/tizen/unified/20190512.221838 submit/tizen/20190510.025027
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 4 Apr 2019 14:31:17 +0000 (16:31 +0200)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 9 May 2019 14:20:25 +0000 (16:20 +0200)
This will allow easy enabling/disabling this functionality by just
removing/not installing package which provides this file.

Change-Id: I4cdabed301c32c977b09f062ad7da93377b572fa

Makefile.am
configs/10-persistent-logs.conf [new file with mode: 0644]
configs/dlog.conf
packaging/dlog.spec

index 48e5137..207b394 100644 (file)
@@ -326,6 +326,7 @@ sysconf_DATA = configs/dlog.conf
 
 dlogconfdir = $(sysconfdir)/dlog.conf.d
 dlogconf_DATA = \
+       configs/10-persistent-logs.conf \
        configs/20-pipe.conf \
        configs/25-logger.conf \
        configs/99-dlog-logger.disable-platform-logging-for-testsuite.conf
diff --git a/configs/10-persistent-logs.conf b/configs/10-persistent-logs.conf
new file mode 100644 (file)
index 0000000..c6228d3
--- /dev/null
@@ -0,0 +1,10 @@
+# Works AS IF a dlogutil instance was active and writing to a file (not a real instance!)
+# The key has to be of the format `dlog_logger_conf_%s`, where %s is an arbitrary idenfitier.
+# The value has to start with "dlogutil" and must contain the `-f` option, which specifies the path.
+# Otherwise accepts same parameters (including filters) as the regular executable dlogutil.
+
+# NOTE: Do not change the following key names!
+#       Additional configuration files (in dlog.conf.d) might want to override these.
+dlog_logger_conf_system=dlogutil -b system -r 2048 -n 1 -f /var/log/dlog/system -v recv_realtime *:I
+dlog_logger_conf_main=dlogutil -b main -r 1024 -n 1 -f /var/log/dlog/main -v recv_realtime *:W
+dlog_logger_conf_radio=dlogutil -b radio -r 256 -n 1 -f /var/log/dlog/radio -v recv_realtime
index 30d58c9..24abcf7 100644 (file)
@@ -71,15 +71,3 @@ util_sorting_time_window=1000
 # increased by `-t` if it is larger, and is completely ignored when the requested sorting order
 # agrees with what the source provides.
 #util_sorting_buffer_size=131072
-
-# Passive logging.
-# Works AS IF a dlogutil instance was active and writing to a file (not a real instance!)
-# The key has to be of the format `dlog_logger_conf_%s`, where %s is an arbitrary idenfitier.
-# The value has to start with "dlogutil" and must contain the `-f` option, which specifies the path.
-# Otherwise accepts same parameters (including filters) as the regular executable dlogutil.
-
-# NOTE: Do not change the following key names!
-#       Additional configuration files (in dlog.conf.d) might want to override these.
-dlog_logger_conf_system=dlogutil -b system -r 2048 -n 1 -f /var/log/dlog/system -v recv_realtime *:I
-dlog_logger_conf_main=dlogutil -b main -r 1024 -n 1 -f /var/log/dlog/main -v recv_realtime *:W
-dlog_logger_conf_radio=dlogutil -b radio -r 256 -n 1 -f /var/log/dlog/radio -v recv_realtime
index 4c8dde1..897a48c 100644 (file)
@@ -39,6 +39,7 @@ Requires(post): /usr/bin/systemctl
 Requires(posttrans): coreutils
 Requires(posttrans): /usr/bin/chsmack
 Requires(postun): /sbin/ldconfig
+Requires: %{name}-config-persistent-logs
 
 %description -n libdlog
 dlog API library. If dlogbackend isn't installed, pipe backend is selected.
@@ -76,6 +77,12 @@ Provides:   tizen-log-syslog
 %description -n log-syslog
 Systemd unit for syslog socket configation to use with dlog
 
+%package config-persistent-logs
+Summary: enable persistent storage of logs
+
+%description config-persistent-logs
+Enable persistent logs in dlog (stored in /var/log/dlog/)
+
 %package -n dlog-doc
 Summary: dlog documentation
 BuildRequires: doxygen
@@ -205,6 +212,9 @@ chsmack -a System /var/log/dlog
 %{_unitdir}/sockets.target.wants/dlog_dev-log.socket
 %{_unitdir}/dlog_dev-log.socket
 
+%files config-persistent-logs
+%{_sysconfdir}/dlog.conf.d/10-persistent-logs.conf
+
 %files -n dlog-doc
 %manifest dlog.manifest
 %license LICENSE.APACHE2.0 LICENSE.MIT