summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwusto <45093377+wusto@users.noreply.github.com>2022-09-21 10:09:54 +0200
committerGitHub <noreply@github.com>2022-09-21 15:09:54 +0700
commit995ba51c3d0ee88b191e0153b1cc1fc3149f87df (patch)
treeea4348d5e9418ba9d977d87eca202da2d9937dfd /src
parent0595b466085313982e8bc796d4a061cf7d0e9bf2 (diff)
downloadDLT-daemon-995ba51c3d0ee88b191e0153b1cc1fc3149f87df.tar.gz
dlt_common.c: Change default logging_mode (#406)
Up to now the default for logging is stdout (DLT_LOG_TO_CONSOLE). Scenario: program_a arg1 | dd of=/my-beauty-case If program_a wants to log to dlt, but it fails to connect to the socket: socket /run/dlt-files/dlt cannot be opened, error:Resource temporarily unavailable. Retrying later... The error will be logged by default to stdout leading in the best case to an error and in the worst to damaged partitions. To solve this log to STDERR (DLT_LOG_TO_STDERR) by default. Co-authored-by: Tobias Kaufmann <Tobias.KA.Kaufmann@bmw.de>
Diffstat (limited to 'src')
-rw-r--r--src/shared/dlt_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c
index 4303c50..adda5db 100644
--- a/src/shared/dlt_common.c
+++ b/src/shared/dlt_common.c
@@ -81,7 +81,7 @@ char dltShmName[NAME_MAX + 1] = "/dlt-shm";
static int logging_level = LOG_INFO;
static char logging_filename[NAME_MAX + 1] = "";
static bool print_with_attributes = false;
-int logging_mode = DLT_LOG_TO_CONSOLE;
+int logging_mode = DLT_LOG_TO_STDERR;
FILE *logging_handle = NULL;
char *message_type[] = { "log", "app_trace", "nw_trace", "control", "", "", "", "" };