You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Description**: The format string for log messages. The format is described here: <https://www.boost.org/doc/libs/1_83_0/libs/log/doc/html/log/tutorial/formatters.html>.
448
+
-**Description**: The format string for log messages using spdlog format patterns. Documentation can be found at: <https://github.com/gabime/spdlog/wiki/Custom-formatting>.
449
+
450
+
### spdlog_async
451
+
452
+
-**Required**: True
453
+
-**Type**: boolean
454
+
-**Default value**: `True`
455
+
-**Constraints**: None
456
+
-**Description**: Whether spdlog is asynchronous or not.
449
457
450
458
### log_to_console
451
459
@@ -471,21 +479,13 @@ This document provides a list of all available Clio configuration properties in
471
479
-**Constraints**: The minimum value is `1`. The maximum value is `4294967295`.
472
480
-**Description**: The log rotation size in megabytes. When the log file reaches this particular size, a new log file starts.
473
481
474
-
### log_directory_max_size
475
-
476
-
-**Required**: True
477
-
-**Type**: int
478
-
-**Default value**: `51200`
479
-
-**Constraints**: The minimum value is `1`. The maximum value is `4294967295`.
480
-
-**Description**: The maximum size of the log directory in megabytes.
481
-
482
-
### log_rotation_hour_interval
482
+
### log_directory_max_files
483
483
484
484
-**Required**: True
485
485
-**Type**: int
486
-
-**Default value**: `12`
486
+
-**Default value**: `25`
487
487
-**Constraints**: The minimum value is `1`. The maximum value is `4294967295`.
488
-
-**Description**: Represents the interval (in hours) for log rotation. If the current log file reaches this value in logging, a new log file starts.
488
+
-**Description**: The maximum number of log files in the directory.
Copy file name to clipboardExpand all lines: docs/logging.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,26 @@ Clio provides several logging options, which all are configurable via the config
6
6
7
7
The minimum level of severity at which the log message will be outputted by default. Severity options are `trace`, `debug`, `info`, `warning`, `error`, `fatal`. Defaults to `info`.
8
8
9
-
## `log_format`
9
+
## `spdlog_format`
10
10
11
-
The format of log lines produced by Clio. Defaults to `"%TimeStamp% (%SourceLocation%) [%ThreadID%] %Channel%:%Severity% %Message%"`.
11
+
The format of log lines produced by Clio using spdlog format patterns. Defaults to `"%Y-%m-%d %H:%M:%S.%f %^(%@) [%t] %n:%L%$ %v"`.
12
12
13
13
Each of the variables expands like so:
14
14
15
-
-`TimeStamp`: The full date and time of the log entry
16
-
-`SourceLocation`: A partial path to the c++ file and the line number in said file (`source/file/path:linenumber`)
17
-
-`ThreadID`: The ID of the thread the log entry is written from
18
-
-`Channel`: The channel that this log entry was sent to
19
-
-`Severity`: The severity (aka log level) the entry was sent at
20
-
-`Message`: The actual log message
15
+
-`%^`: Start color range
16
+
-`%Y-%m-%d %H:%M:%S.%f`: The full date and time of the log entry with microsecond precision
17
+
-`%@`: A partial path to the c++ file and the line number in said file (`source/file/path:linenumber`)
18
+
-`%t`: The ID of the thread the log entry is written from
19
+
-`%n`: The logger name (channel) that this log entry was sent to
20
+
-`%l`: The severity (aka log level) the entry was sent at
21
+
-`%$`: End color range
22
+
-`%v`: The actual log message
23
+
24
+
For more information about spdlog format patterns, see: <https://github.com/gabime/spdlog/wiki/Custom-formatting>
25
+
26
+
## `spdlog_async`
27
+
28
+
Whether spdlog is asynchronous or not.
21
29
22
30
## `log_channels`
23
31
@@ -56,16 +64,9 @@ If the option is not specified, the logs are not written to a file.
56
64
57
65
The max size of the log file in **megabytes** before it will rotate into a smaller file. Defaults to 2GB.
58
66
59
-
## `log_directory_max_size`
60
-
61
-
The max size of the log directory in **megabytes** before old log files will be deleted to free up space. Defaults to 50GB.
67
+
## `log_directory_max_files`
62
68
63
-
## `log_rotation_hour_interval`
64
-
65
-
The time interval in **hours** after the last log rotation to automatically rotate the current log file. Defaults to 12 hours.
66
-
67
-
> [!NOTE]
68
-
> Log rotation based on time occurs in conjunction with size-based log rotation. For example, if a size-based log rotation occurs, the timer for the time-based rotation will reset.
69
+
The max number of log files in the directory before old log files will be deleted to free up space. Defaults to 25.
0 commit comments