xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
tests
libxrpl
helpers
TestSink.h
1
#pragma once
2
3
#include <xrpl/beast/utility/Journal.h>
4
5
#include <
string
>
6
7
namespace
xrpl
{
8
class
TestSink
:
public
beast::Journal::Sink
9
{
10
public
:
11
static
TestSink
&
12
instance
()
13
{
14
static
TestSink
sink{};
15
return
sink;
16
}
17
18
TestSink
(
beast::Severity
threshold
=
beast::Severity::Debug
);
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
std::string
beast::Journal::Sink
Abstraction for the underlying message destination.
Definition
Journal.h:59
beast::Journal::Sink::threshold
virtual Severity threshold() const
Returns the minimum severity level this sink will report.
Definition
beast_Journal.cpp:96
xrpl::TestSink::instance
static TestSink & instance()
Definition
TestSink.h:12
xrpl::TestSink::write
void write(beast::Severity level, std::string const &text) override
Write text to the sink at the specified severity.
Definition
TestSink.cpp:26
xrpl::TestSink::TestSink
TestSink(beast::Severity threshold=beast::Severity::Debug)
Definition
TestSink.cpp:21
xrpl::TestSink::writeAlways
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
beast::Severity
Severity
Severity level / threshold of a Journal message.
Definition
Journal.h:16
beast::Severity::Debug
@ Debug
Definition
Journal.h:20
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
string
Generated by
1.17.0