Sound Byte Libs
0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
tee_output.hpp
Go to the documentation of this file.
1
/*
2
* tee_output.hpp — Dual-sink log output template
3
*
4
* Composes two log sinks so every write goes to both.
5
* Works with any type that provides static void write(const char*).
6
*/
7
8
#ifndef SBL_COMMON_LOG_TEE_OUTPUT_HPP_
9
#define SBL_COMMON_LOG_TEE_OUTPUT_HPP_
10
11
namespace
sbl::log
{
12
13
template
<
typename
A,
typename
B>
14
struct
TeeOutput
{
15
static
void
write
(
const
char
* str) {
16
A::write(str);
17
B::write(str);
18
}
19
};
20
21
}
// namespace sbl::log
22
23
#endif
// SBL_COMMON_LOG_TEE_OUTPUT_HPP_
sbl::log
Logging.
Definition
banner.hpp:51
sbl::log::TeeOutput
Definition
tee_output.hpp:14
sbl::log::TeeOutput::write
static void write(const char *str)
Definition
tee_output.hpp:15
src
sbl
common
log
tee_output.hpp
Generated by
1.9.8