mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-10 06:45:50 +00:00
docs: Add log format description (#2461)
This commit is contained in:
@@ -445,7 +445,23 @@ This document provides a list of all available Clio configuration properties in
|
|||||||
- **Type**: string
|
- **Type**: string
|
||||||
- **Default value**: `%Y-%m-%d %H:%M:%S.%f %^%3!l:%n%$ - %v`
|
- **Default value**: `%Y-%m-%d %H:%M:%S.%f %^%3!l:%n%$ - %v`
|
||||||
- **Constraints**: None
|
- **Constraints**: None
|
||||||
- **Description**: The format string for log messages using spdlog format patterns. Documentation can be found at: <https://github.com/gabime/spdlog/wiki/Custom-formatting>.
|
- **Description**: The format string for log messages using spdlog format patterns.
|
||||||
|
|
||||||
|
Each of the variables expands like so:
|
||||||
|
|
||||||
|
- `%Y-%m-%d %H:%M:%S.%f`: The full date and time of the log entry with microsecond precision
|
||||||
|
- `%^`: Start color range
|
||||||
|
- `%3!l`: The severity (aka log level) the entry was sent at stripped to 3 characters
|
||||||
|
- `%n`: The logger name (channel) that this log entry was sent to
|
||||||
|
- `%$`: End color range
|
||||||
|
- `%v`: The actual log message
|
||||||
|
|
||||||
|
Some additional variables that might be useful:
|
||||||
|
|
||||||
|
- `%@`: A partial path to the C++ file and the line number in the said file (`src/file/path:linenumber`)
|
||||||
|
- `%t`: The ID of the thread the log entry is written from
|
||||||
|
|
||||||
|
Documentation can be found at: <https://github.com/gabime/spdlog/wiki/Custom-formatting>.
|
||||||
|
|
||||||
### log.is_async
|
### log.is_async
|
||||||
|
|
||||||
|
|||||||
@@ -263,9 +263,23 @@ private:
|
|||||||
KV{.key = "log.level",
|
KV{.key = "log.level",
|
||||||
.value = "The general logging level of Clio. This level is applied to all log channels that do not have an "
|
.value = "The general logging level of Clio. This level is applied to all log channels that do not have an "
|
||||||
"explicitly defined logging level."},
|
"explicitly defined logging level."},
|
||||||
KV{.key = "log.format",
|
KV{.key = "log.format", .value = R"(The format string for log messages using spdlog format patterns.
|
||||||
.value = "The format string for log messages using spdlog format patterns. Documentation can be found at: "
|
|
||||||
"<https://github.com/gabime/spdlog/wiki/Custom-formatting>."},
|
Each of the variables expands like so:
|
||||||
|
|
||||||
|
- `%Y-%m-%d %H:%M:%S.%f`: The full date and time of the log entry with microsecond precision
|
||||||
|
- `%^`: Start color range
|
||||||
|
- `%3!l`: The severity (aka log level) the entry was sent at stripped to 3 characters
|
||||||
|
- `%n`: The logger name (channel) that this log entry was sent to
|
||||||
|
- `%$`: End color range
|
||||||
|
- `%v`: The actual log message
|
||||||
|
|
||||||
|
Some additional variables that might be useful:
|
||||||
|
|
||||||
|
- `%@`: A partial path to the C++ file and the line number in the said file (`src/file/path:linenumber`)
|
||||||
|
- `%t`: The ID of the thread the log entry is written from
|
||||||
|
|
||||||
|
Documentation can be found at: <https://github.com/gabime/spdlog/wiki/Custom-formatting>.)"},
|
||||||
KV{.key = "log.is_async", .value = "Whether spdlog is asynchronous or not."},
|
KV{.key = "log.is_async", .value = "Whether spdlog is asynchronous or not."},
|
||||||
KV{.key = "log.enable_console", .value = "Enables or disables logging to the console."},
|
KV{.key = "log.enable_console", .value = "Enables or disables logging to the console."},
|
||||||
KV{.key = "log.directory", .value = "The directory path for the log files."},
|
KV{.key = "log.directory", .value = "The directory path for the log files."},
|
||||||
|
|||||||
Reference in New Issue
Block a user