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) enabled

  • false: 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):

  1. kkk

  2. sskkk

  3. mmsskkk

  4. hhmmsskkk

  5. DDhhmmsskkk

  6. MMDDhhmmsskkk

  7. 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.

PERIOD

Type

Minimum

Maximum

Example

Integer

60[2]

86400

3600 (1 hour)

OFFSET

Type

Minimum

Maximum

Example

Integer

0

PERIOD - 1

0

Warning

The OFFSET value shall be less than the PERIOD value.

Examples:

  • 0+0: Time based file split disabled

  • 60+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:00

  • 43200+0: Splits twice a day, 00:00:00 and 12:00:00

  • 43200+21600: Splits twice a day offset by 6 hours, 00:06:00 and 18:00:00

  • 86400+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 fileSplitSize[3]

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: 4

62: >

72: H

82: R

92: n

102: f

112: p

122: z

33: !

43: +

53: 5

63: ?

73: I

83: S

93: ]

103: g

113: q

123: f

34: "

44: ,

54: 6

64: @

74: J

84: T

94: ^

104: h

114: r

124: j

35: #

45: -

55: 7

65: A

75: K

85: U

95: _

105: i

115: s

125: g

36: $

46: .

56: 8

66: B

76: L

86: V

96: `

106: j

116: t

126: ~

37: %

47: /

57: 9

67: C

77: M

87: W

97: a

107: k

117: u

38: &

48: 0

58: :

68: D

78: N

88: X

98: b

108: l

118: v

39: '

49: 1

59: ;

69: E

79: O

89: Y

99: c

109: m

119: w

40: (

50: 2

60: <

70: F

80: P

90: Z

100:d

110: n

120: x

41: )

51: 3

61: =

71: G

81: Q

91: [

101:e

111: o

121: y