quill
NullSink.h
1 
7 #pragma once
8 
9 #include "quill/core/Attributes.h"
10 #include "quill/core/LogLevel.h"
11 #include "quill/sinks/Sink.h"
12 
13 #include <cstdint>
14 #include <string>
15 #include <string_view>
16 #include <utility>
17 #include <vector>
18 
19 QUILL_BEGIN_NAMESPACE
20 
21 QUILL_BEGIN_EXPORT
22 
24 class MacroMetadata;
25 
26 class NullSink : public Sink
27 {
28 public:
32  QUILL_ATTRIBUTE_HOT void write_log(MacroMetadata const*, uint64_t, std::string_view,
33  std::string_view, std::string const&, std::string_view,
34  LogLevel, std::string_view, std::string_view,
35  std::vector<std::pair<std::string, std::string>> const*,
36  std::string_view, std::string_view) override
37  {
38  }
39 
40  QUILL_ATTRIBUTE_HOT void flush_sink() override {}
41 };
42 
43 QUILL_END_EXPORT
44 
45 QUILL_END_NAMESPACE
Base class for sinks.
Definition: Sink.h:46
Captures and stores information about a logging event in compile time.
Definition: MacroMetadata.h:24
QUILL_ATTRIBUTE_HOT void flush_sink() override
Flushes the sink, synchronizing the associated sink with its controlled output sequence.
Definition: NullSink.h:40
QUILL_ATTRIBUTE_HOT void write_log(MacroMetadata const *, uint64_t, std::string_view, std::string_view, std::string const &, std::string_view, LogLevel, std::string_view, std::string_view, std::vector< std::pair< std::string, std::string >> const *, std::string_view, std::string_view) override
Discards the provided log record.
Definition: NullSink.h:32
Definition: NullSink.h:26