Github   Telegram
No Matches
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
components::LoggingConfigurator Class Referencefinal

Helper component to configure logging. More...

#include <userver/components/logging_configurator.hpp>

+ Inheritance diagram for components::LoggingConfigurator:
+ Collaboration diagram for components::LoggingConfigurator:

Public Member Functions

 LoggingConfigurator (const ComponentConfig &config, const ComponentContext &context)

Static Public Member Functions

static yaml_config::Schema GetStaticConfigSchema ()

Static Public Attributes

static constexpr auto kName = "logging-configurator"

Detailed Description

Helper component to configure logging.

The functionality is not in Trace or Logger components because that introduces circular dependency between Logger and DynamicConfig.

Dynamic config

Static options:

Name Description Default value
limited-logging-enable set to true to make LOG_LIMITED drop repeated logs -
limited-logging-interval utils::StringToDuration suitable duration string to group repeated logs into one message -

Config example:

# yaml
limited-logging-enable: true
limited-logging-interval: 1s

Definition at line 35 of file logging_configurator.hpp.

Member Data Documentation

◆ kName

constexpr auto components::LoggingConfigurator::kName = "logging-configurator"

Definition at line 37 of file logging_configurator.hpp.

The documentation for this class was generated from the following file: