Sound Byte Libs 0.5.1-340-gab5b79a
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 * @file tee_output.hpp
3 * @brief Dual-sink log output template
4 *
5 * Composes two log sinks so every write goes to both.
6 * Works with any type that provides static void write(const char*).
7 */
8
9#ifndef SBL_COMMON_LOG_TEE_OUTPUT_HPP_
10#define SBL_COMMON_LOG_TEE_OUTPUT_HPP_
11
12namespace sbl::log {
13
14template<typename A, typename B>
15struct TeeOutput {
16 static void write(const char* str) {
17 A::write(str);
18 B::write(str);
19 }
20};
21
22} // namespace sbl::log
23
24#endif // SBL_COMMON_LOG_TEE_OUTPUT_HPP_
Logging.
Definition banner.hpp:53
constexpr bool is_sink_v
Definition sink.hpp:55