summaryrefslogtreecommitdiff
path: root/src/daemon/dlt-daemon.c
diff options
context:
space:
mode:
authorChristoph Lipka <clipka@de.adit-jv.com>2017-06-01 09:53:58 +0200
committerSaya Sugiura <ssugiura@jp.adit-jv.com>2019-05-06 15:55:07 +0900
commita729e27fbaeee7b9c449cb4af76177fc2beb2428 (patch)
tree2c95360f24758fe186b5f3f0b1ca683cacf23051 /src/daemon/dlt-daemon.c
parent09d49baa0e029a156392063562fb4b186011e5e7 (diff)
downloadDLT-daemon-a729e27fbaeee7b9c449cb4af76177fc2beb2428.tar.gz
dlt-daemon: fix internal logging to file after daemonize
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rw-r--r--src/daemon/dlt-daemon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c
index cdfddec..5fee93e 100644
--- a/src/daemon/dlt-daemon.c
+++ b/src/daemon/dlt-daemon.c
@@ -843,6 +843,11 @@ int dlt_daemon_local_init_p1(DltDaemon *daemon, DltDaemonLocal *daemon_local, in
if (daemon_local->flags.dflag)
dlt_daemon_daemonize(daemon_local->flags.vflag);
+ /* Re-Initialize internal logging facility after fork */
+ dlt_log_set_filename(daemon_local->flags.loggingFilename);
+ dlt_log_set_level(daemon_local->flags.loggingLevel);
+ dlt_log_init(daemon_local->flags.loggingMode);
+
/* initialise structure to use DLT file */
ret = dlt_file_init(&(daemon_local->file), daemon_local->flags.vflag);