|
enum | ColourMode { Always,
Automatic,
Never
} |
|
◆ set_colour_mode()
QUILL_ATTRIBUTE_COLD void ConsoleSinkConfig::set_colour_mode |
( |
ColourMode |
colour_mode | ) |
|
|
inline |
Sets the colour mode for console output.
This function determines when colours are applied in the console output. Valid options for the colour mode are:
- Always: Colours are always enabled.
- Automatic: Colours are enabled automatically based on the environment (e.g., terminal support).
- Never: Colours are never enabled.
The default value is 'Automatic'.
- Parameters
-
colour_mode | The desired colour mode. |
◆ set_colours()
QUILL_ATTRIBUTE_COLD void ConsoleSinkConfig::set_colours |
( |
Colours |
colours | ) |
|
|
inline |
Sets custom colours for each log level.
This function allows specifying a custom Colours instance, enabling fine-grained control over the colours used for different log levels in the console output.
- Parameters
-
colours | The Colours instance to use. |
◆ set_override_pattern_formatter_options()
QUILL_ATTRIBUTE_COLD void ConsoleSinkConfig::set_override_pattern_formatter_options |
( |
std::optional< PatternFormatterOptions > const & |
options | ) |
|
|
inline |
Sets custom pattern formatter options for this sink.
By default, the logger's pattern formatter is used to format log messages. This function allows overriding the default formatter with custom options for this specific sink. If a custom formatter is provided, it will be used instead of the logger's formatter.
- Parameters
-
options | The custom pattern formatter options to use |
◆ set_stream()
QUILL_ATTRIBUTE_COLD void ConsoleSinkConfig::set_stream |
( |
std::string const & |
stream | ) |
|
|
inline |
Sets the output stream for console logging.
This function allows selecting the output stream where log messages should be printed. The valid options are:
- "stdout": Logs are printed to the standard output.
- "stderr": Logs are printed to the standard error.
The default value is "stdout".
- Parameters
-
stream | The output stream to use. |
The documentation for this class was generated from the following file: