5#include <userver/logging/format.hpp>
6#include <userver/logging/level.hpp>
17 LoggerBase() =
delete;
18 LoggerBase(
const LoggerBase&) =
delete;
19 LoggerBase(LoggerBase&&) =
delete;
20 LoggerBase& operator=(
const LoggerBase&) =
delete;
21 LoggerBase& operator=(LoggerBase&&) =
delete;
23 explicit LoggerBase(
Format format)
noexcept;
25 virtual ~LoggerBase();
27 virtual void Log(
Level level, std::string_view msg) = 0;
31 virtual void PrependCommonTags(TagWriter writer)
const;
33 Format GetFormat()
const noexcept;
35 virtual void SetLevel(
Level level);
36 Level GetLevel()
const noexcept;
37 bool ShouldLog(
Level level)
const noexcept;
39 void SetFlushOn(
Level level);
40 bool ShouldFlush(
Level level)
const;
43 virtual bool DoShouldLog(
Level level)
const noexcept;
47 std::atomic<
Level> level_{Level::kNone};
48 std::atomic<
Level> flush_level_{Level::kWarning};
51bool ShouldLogNoSpan(
const LoggerBase& logger,
Level level)
noexcept;