userver: logging::DefaultLoggerGuard Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
logging::DefaultLoggerGuard Class Referencefinal

#include <userver/logging/log.hpp>

Detailed Description

Atomically replaces the default logger.

Warning
Do not use this class if you are using a component system.

Definition at line 38 of file log.hpp.

Public Member Functions

 DefaultLoggerGuard (LoggerPtr new_default_logger) noexcept
 
 DefaultLoggerGuard (DefaultLoggerGuard &&)=delete
 
DefaultLoggerGuardoperator= (DefaultLoggerGuard &&)=delete
 

Constructor & Destructor Documentation

◆ DefaultLoggerGuard()

logging::DefaultLoggerGuard::DefaultLoggerGuard ( LoggerPtr new_default_logger)
explicitnoexcept

Atomically replaces the default logger.

Warning
The logger should live as long as someone is using it. Generally speaking - it should live for a lifetime of the application, or for a lifetime of the coroutine engine.

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