COVESA / COVESA/dlt-daemon

Dlt offline_storage file name is garbled, and always override a same filename, how can i fixed it?

Open
#809 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
459
Forks
340
Avg merge
4d 21h
Merged PRs (30d)
2

Description

I had enable system journal like below:
```bash
diff --git a/src/system/dlt-system.conf b/src/system/dlt-system.conf
index 77bc73e..a114b6b 100644
--- a/src/system/dlt-system.conf
+++ b/src/system/dlt-system.conf
@@ -49,7 +49,7 @@ SyslogPort = 47111
# it causes bind error (can see on connected client).

# Enable the Systemd Journal Adapter (Default: 0)
-JournalEnable = 0
+JournalEnable = 1

# The Context Id of the journal adapter (Default: JOUR)
JournalContextId = JOUR
@@ -72,7 +72,7 @@ JournalFollow = 0
# 5 Notice DLT_LOG_INFO
# 6 Informational DLT_LOG_INFO
# 7 Debug DLT_LOG_DEBUG
-JournalMapLogLevels = 1
+JournalMapLogLevels = 7

# Use the original timestamp (uptime when the event actually occured) as DLT timestamp (Default: 1)
JournalUseOriginalTimestamp = 1

```
And dlt.conf:
```bash
@ -39,7 +39,7 @@ SharedMemorySize = 100000
# 1 = log to syslog
# 2 = log to file (see LoggingFilename)
# 3 = log to stderr
-LoggingMode = 0
+LoggingMode = 2

# The internal log level, up to which logs are written (Default: 6)
# LOG_EMERG = 0, LOG_ALERT = 1, LOG_CRIT = 2, LOG_ERR = 3, LOG_WARNING = 4, LOG_NOTICE = 5, LOG_INFO = 6, LOG_DEBUG = 7
@@ -184,23 +184,23 @@ ControlSocketPath = /tmp/dlt-ctrl.sock
##############################################################################
# Store DLT log messages, if not set offline logstorage is off (Default: off)
# Maximum devices to be used as offline logstorage devices
-# OfflineLogstorageMaxDevices = 1
+OfflineLogstorageMaxDevices = 1

# Path to store DLT offline log storage messages (Default: off)
-# OfflineLogstorageDirPath = /opt
+OfflineLogstorageDirPath = /log/dltlog/

# File options
# Appends timestamp in log file name, Disable by setting to 0 (Default: 1)
-# OfflineLogstorageTimestamp = 0
+OfflineLogstorageTimestamp = 0

# Appends delimiter in log file name, allowed punctutations only (Default: _)
-# OfflineLogstorageDelimiter = _
+OfflineLogstorageDelimiter = _

# Wrap around value for log file count in file name (Default: UINT_MAX)
-# OfflineLogstorageMaxCounter = 999
+OfflineLogstorageMaxCounter = 999

# Maximal used memory for Logstorage Cache in KB (Default: 30000 KB)
-# OfflineLogstorageCacheSize = 30000
+OfflineLogstorageCacheSize = 30000
```
dlt_logstorage.conf below:
```bash
[FILTER0]
LogAppName=xxxxxxxxxxxx
ContextName=.*
LogLevel=DLT_LOG_ERROR
File=dlt
FileSize=1000000
NOFiles=30
GzipCompression=off
[FILTER1]
LogAppName=xxxxxx,xxxxx
ContextName=.*
LogLevel=DLT_LOG_ERROR
File=dlt
FileSize=1000000
NOFiles=30
GzipCompression=off
[FILTER2]
LogAppName=SYS
ContextName=.*
LogLevel=DLT_LOG_INFO
File=journal
FileSize=2000000
NOFiles=30
GzipCompression=on
```

**Problems: **
And the wrong file name is repeated.
```bash

-rw-rw-rw-. 1 root root 977K Dec 26 17:55 dlt_103.dlt
-rw-rw-rw-. 1 root root 977K Dec 26 17:55 dlt_104.dlt
-rw-rw-rw-. 1 root root 977K Dec 29 17:52 dlt_105.dlt
-rw-rw-rw-. 1 root root 771K Dec 29 18:40 'dlt_'$'\252''106.dlt'
drwxr-xr-x. 2 root root 4.0K May 29 2025 dump
-rw-rw-rw-. 1 root root 2.0M Jan 1 2025 journal_144.dlt.gz
-rw-rw-rw-. 1 root root 2.0M Dec 31 2024 journal_145.dlt.gz
-rw-rw-rw-. 1 root root 2.0M Dec 31 2024 journal_146.dlt.gz
-rw-rw-rw-. 1 root root 2.0M Dec 31 2024 journal_147.dlt.gz
-rw-rw-rw-. 1 root root 2.0M Dec 29 18:01 journal_148.dlt.gz
-rw-rw-rw-. 1 root root 301K Dec 29 18:40 'journal_'$'\252''149.dlt.gz
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.