diff options
author | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2011-11-09 22:04:30 +0100 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2011-11-09 22:04:30 +0100 |
commit | c9496d17980bbc9a2c5b30742e6ff1ff7ec299b2 (patch) | |
tree | d714151f647e5cbe4980fe0f3000fbbc6cdad03e /src/daemon/dlt_daemon_common.c | |
parent | 4dce943dca5f9f9f49287819504c15ded49e7fc8 (diff) | |
download | DLT-daemon-c9496d17980bbc9a2c5b30742e6ff1ff7ec299b2.tar.gz |
Added dlt-daemon internal logging configuration into dlt.conf file.
Internal logging to file now also possible.
Diffstat (limited to 'src/daemon/dlt_daemon_common.c')
-rwxr-xr-x | src/daemon/dlt_daemon_common.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c index dbb1e7a..4877825 100755 --- a/src/daemon/dlt_daemon_common.c +++ b/src/daemon/dlt_daemon_common.c @@ -907,11 +907,13 @@ int dlt_daemon_configuration_load(DltDaemon *daemon,const char *filename, int ve if(strcmp(token,"LoggingMode")==0) { daemon->mode = atoi(value); - printf("Option: %s=%s\n",token,value); + sprintf(str,"Runtime Option: %s=%d\n",token,daemon->mode); + dlt_log(LOG_INFO, str); } else { - fprintf(stderr, "Unknown option: %s=%s\n",token,value); + sprintf(str,"Unknown option: %s=%s\n",token,value); + dlt_log(LOG_ERR, str); } } } @@ -924,7 +926,8 @@ int dlt_daemon_configuration_load(DltDaemon *daemon,const char *filename, int ve } else { - fprintf(stderr, "Cannot open configuration file: %s\n",filename); + sprintf(str,"Cannot open configuration file: %s\n",filename); + dlt_log(LOG_WARNING, str); } return 0; |