summaryrefslogtreecommitdiff
path: root/src/gateway/dlt_gateway.c
diff options
context:
space:
mode:
authorDaniel Weber <37300320+danielweber2018@users.noreply.github.com>2023-03-10 15:31:48 +0100
committerGitHub <noreply@github.com>2023-03-10 15:31:48 +0100
commit363d433a5dac141020cef4f698f60644fe4a202c (patch)
tree6d21d2447309ca9e4a76fb3c70d36b216d1ef753 /src/gateway/dlt_gateway.c
parent3b8a82ffae22c51bb02c11e669754983e8aabd5a (diff)
downloadDLT-daemon-363d433a5dac141020cef4f698f60644fe4a202c.tar.gz
logfile: exhance internal dlt logging by introducing size limits (#369)
Enhance dlt logging such that multiple files are used as it is done for the offline traces. Add limit-specific config values for logging. For this purpose the pattern of index-based file names is used only. This approach of logging to multiple files and rotating in order to keep the limits ensures that dlt logs take care of available space on the underlying file system and do not grow infinitely. Signed-off-by: Daniel Weber <daniel.w.weber@daimler.com> Co-authored-by: Oleg Tropmann <oleg.tropmann@daimler.com>
Diffstat (limited to 'src/gateway/dlt_gateway.c')
-rw-r--r--src/gateway/dlt_gateway.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gateway/dlt_gateway.c b/src/gateway/dlt_gateway.c
index 2b4f070..3d832ce 100644
--- a/src/gateway/dlt_gateway.c
+++ b/src/gateway/dlt_gateway.c
@@ -669,6 +669,9 @@ int dlt_gateway_configure(DltGateway *gateway, char *config_file, int verbose)
/* read configuration file */
file = dlt_config_file_init(config_file);
+ if(file == NULL) {
+ return DLT_RETURN_ERROR;
+ }
/* get number of entries and allocate memory to store information */
ret = dlt_config_file_get_num_sections(file, &num_sections);