Log
This page documents the [log]
configuration section.
This section contains configuration parameters related to the log files. This includes the following:
Device ID (inserted in log file header)
Log file formatting (format of log file entries)
Log file splitting (when to generate a new log file)
Cyclic logging (what to do when memory is full)
Default
[log]
loggerID = id0001 ; Logger identification string (max 15 characters)
loggingEnb = true ; Default logging state
valueSeparator = 59 ; Log file separator ASCII char (DEC)
timestampFormat = 4 ; Timestamp format ( 0 = kkk, 6 = YYYYMMDDhhmmsskkk)
timestampTimeSeparator = 0 ; Timestamp time separator ASCII char (DEC, 0 = none)
timestampTimeMsSeparator = 0 ; Timestamp millisecond separator ASCII char (DEC, 0 = none)
timestampDateSeparator = 0 ; Timestamp date separator ASCII char (DEC, 0 = none)
timeTimeDateSeparator = 84 ; Timestamp date / time separator ASCII char (DEC, 0 = none)
fileSplitSize = 20 ; File split size in MB (DEC, range: 1-512)
fileSplitTime = 0+0 ; File split time in sec (DEC, 0+0 = none, range: 60-86400)
cyclicLogging = false ; Delete oldest stored file when full
cyclicLoggingDataLimit = 0 ; Limit on total logged data in MB (DEC, 0 = none)
Fields explained
The [log]
section entries are explained below.
loggerID
A logger identification string. The string is copied to the log file header such that log files from different loggers can be identified.
Type |
Min length |
Max length |
Example |
---|---|---|---|
String |
0 |
15 |
Truck21 |
loggingEnb
Sets the initial logging state.
Type |
Options |
---|---|
Boolean |
true, false |
true
: The logging is (initially) enabledfalse
: The logging is (initially) disabled
Note
If the initial logging state is set to false
, then the logger will not log messages until it has received a valid control-signal enabling logging.
valueSeparator
Sets the symbol to use as value separator in the log file. See Character map for valid values.
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
32 |
126 |
59 |
Examples of resulting log file entries:
valueSeparator = 59
:10T084838033;0;1;aabbcc
valueSeparator = 44
:10T085133867,0,1,aabbcc
timestampFormat
Sets the log file timestamp format.
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
0 |
6 |
4 |
Valid formats are (with kkk
as milliseconds):
kkk
sskkk
mmsskkk
hhmmsskkk
DDhhmmsskkk
MMDDhhmmsskkk
YYYYMMDDhhmmsskkk
Examples of resulting log file entries:
timestampFormat = 4
:10T084838033;0;1;aabbcc
timestampFormat = 6
:20230710T084838033;0;1;aabbcc
timestampTimeSeparator
Sets the symbol to use as timestamp separator in the log file. See Character map for valid values. Can be set to 0
to disable the use of a separator.
The positions of the timestamp separator are illustrated here: \(\texttt{YYYYMMDDhh}\color{red}{\texttt{X}}\texttt{mm}\color{red}{\texttt{X}}\texttt{sskkk}\)
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
32[1] |
126 |
0 |
Examples of resulting log file entries:
timestampTimeSeparator = 0
:10T084838033;0;1;aabbcc
(no separator used)timestampTimeSeparator = 58
:10T08:48:38033;0;1;0;1;aabbcc
timestampTimeMsSeparator
Sets the symbol to use as millisecond separator in the log file. See Character map for valid values. Can be set to 0
to disable the use of a separator.
The position of the separator is illustrated here: \(\texttt{YYYYMMDDhhmmss}\color{red}{\texttt{X}}\texttt{kkk}\)
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
32[1] |
126 |
0 |
Examples of resulting log file entries:
timestampTimeMsSeparator = 0
:10T084838033;0;1;aabbcc
(no separator used)timestampTimeMsSeparator = 46
:10T084838.033;0;1;aabbcc
timestampDateSeparator
Sets the symbol to use as date separator in the log file. See Character map for valid values. Can be set to 0
to disable the use of a separator.
The positions of the timestamp separator are illustrated here: \(\texttt{YYYY}\color{red}{\texttt{X}}\texttt{MM}\color{red}{\texttt{X}}\texttt{DDhhmmsskkk}\)
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
32[1] |
126 |
0 |
Examples of resulting log file entries (with timestampFormat = 6
):
timestampDateSeparator = 0
:20230710T084838033;0;1;aabbcc
(no separator used)timestampDateSeparator = 47
:2023/07/10T084838033;0;1;aabbcc
Note
timestampDateSeparator
is only relevant when timestampFormat = 5
or timestampFormat = 6
timeTimeDateSeparator
Sets the symbol to use as time/date separator in the log file. See Character map for valid values. Can be set to 0
to disable the use of a separator.
The position of the separator is illustrated here: \(\texttt{YYYYMMDD}\color{red}{\texttt{X}}\texttt{hhmmsskkk}\)
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
32[1] |
126 |
0 |
Examples of resulting log file entries:
timeTimeDateSeparator = 0
:10084838033;0;1;aabbcc
(none)timeTimeDateSeparator = 84
:10T084838033;0;1;aabbcc
timeTimeDateSeparator = 32
:10 084838033;0;1;aabbcc
(space)
Note
timeTimeDateSeparator
is only relevant when timestampFormat = 4
, timestampFormat = 5
or timestampFormat = 6
fileSplitSize
Sets the log file split size in MB. When the file split size is reached, a new file is created and logging continues.
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
1 |
512 |
20 |
Note
Log files can end up being smaller than the set split size if the time set by fileSplitTime
is reached first.
fileSplitTime
Sets the log file split time in seconds with optional offset. When the file split time is reached, a new file is created and logging continues.
The field is composed of two values separated by +
the PERIOD
and the OFFSET
: PERIOD+OFFSET
. The PERIOD
and OFFSET
are relative to midnight (00:00:00). See examples below for more information on interpretation.
Disable time based split by entering 0+0
.
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
60[2] |
86400 |
3600 (1 hour) |
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
0 |
|
0 |
Warning
The OFFSET
value shall be less than the PERIOD
value.
Examples:
0+0
: Time based file split disabled60+0
: Splits every minute, e.g. 12:00:00, 12:01:00, …120+0
: Splits every even minute, e.g. 12:00:00, 12:02:00, …120+60
: Splits every odd minute, e.g. 12:01:00, 12:03:00, …3600+0
: Splits every hour, e.g. 12:00:00, 13:00:00, …3600+1800
: Splits every hour offset by 30 minutes, e.g. 12:30:00, 13:30:00, …7200+0
: Splits every even hour, e.g. 12:00:00, 14:00:00, …7200+3600
: Splits every odd hour, e.g. 13:00:00, 15:00:00, …21600+0
: Splits every 6 hours, 00:00:00, 06:00:00, 12:00:00 and 18:00:0043200+0
: Splits twice a day, 00:00:00 and 12:00:0043200+21600
: Splits twice a day offset by 6 hours, 00:06:00 and 18:00:0086400+0
: Splits each day at midnight, 00:00:00, 00:00:00, …86400+57600
: Splits each day at 16:00:00
cyclicLogging
Sets the state of the cyclic-logging mode. With cycling-logging mode enabled the oldest log files are deleted when the memory card becomes full - allowing logging to continue.
Type |
Options |
---|---|
Boolean |
true, false |
true
: Cyclic-logging enabled (logging continues when memory full)false
: Cyclic-logging enabled (logging stops when memory full)
cyclicLoggingDataLimit
Sets a limit to the total amount of data stored on the memory card in MB. When the limit is reached, the oldest log files are deleted to keep the total amount of data stored below the limit.
Disable the data limit by entering 0
(the total memory card size is used as limit).
Type |
Minimum |
Maximum |
Example |
---|---|---|---|
Integer |
2 x |
Size of memory[4] |
0 |
Note
cyclicLoggingDataLimit
(true
) requires cyclicLogging
is enabled (true
)
Character map
Map between valid separator symbols and configuration field values.
32: SPACE |
42: |
52: |
62: |
72: |
82: |
92: |
102: |
112: |
122: |
33: |
43: |
53: |
63: |
73: |
83: |
93: |
103: |
113: |
123: |
34: |
44: |
54: |
64: |
74: |
84: |
94: |
104: |
114: |
124: |
35: |
45: |
55: |
65: |
75: |
85: |
95: |
105: |
115: |
125: |
36: |
46: |
56: |
66: |
76: |
86: |
96: |
106: |
116: |
126: |
37: |
47: |
57: |
67: |
77: |
87: |
97: |
107: |
117: |
|
38: |
48: |
58: |
68: |
78: |
88: |
98: |
108: |
118: |
|
39: |
49: |
59: |
69: |
79: |
89: |
99: |
109: |
119: |
|
40: |
50: |
60: |
70: |
80: |
90: |
100: |
110: |
120: |
|
41: |
51: |
61: |
71: |
81: |
91: |
101: |
111: |
121: |