xrpld
Loading...
Searching...
No Matches
TestSink.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4
5#include <string>
6
7namespace xrpl {
9{
10public:
11 static TestSink&
13 {
14 static TestSink sink{};
15 return sink;
16 }
17
19
20 void
21 write(beast::Severity level, std::string const& text) override;
22
23 void
24 writeAlways(beast::Severity level, std::string const& text) override;
25};
26} // namespace xrpl
Abstraction for the underlying message destination.
Definition Journal.h:59
virtual Severity threshold() const
Returns the minimum severity level this sink will report.
static TestSink & instance()
Definition TestSink.h:12
void write(beast::Severity level, std::string const &text) override
Write text to the sink at the specified severity.
Definition TestSink.cpp:26
TestSink(beast::Severity threshold=beast::Severity::Debug)
Definition TestSink.cpp:21
void writeAlways(beast::Severity level, std::string const &text) override
Bypass filter and write text to the sink at the specified severity.
Definition TestSink.cpp:34
Severity
Severity level / threshold of a Journal message.
Definition Journal.h:16
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5