diff --git a/test/mocks.h b/test/mocks.h index 117b058a..6fb27cf8 100644 --- a/test/mocks.h +++ b/test/mocks.h @@ -83,41 +83,6 @@ struct MockLogger : public Logger { } }; -// `Journal` is an implementation of `Logger` that appends logged records to an -// internal `vector`, `records`. -struct Journal : public Logger { - struct Record { - LogLevel level; - uint64_t trace_id; // zero if absent - uint64_t span_id; // zero if absent - std::string message; - }; - - mutable std::vector records; - - Journal() : Logger([](LogLevel, ot::string_view) {}) {} - void Log(LogLevel level, ot::string_view message) const noexcept override { - records.push_back(Record{level, 0, 0, message}); - } - void Log(LogLevel level, uint64_t trace_id, ot::string_view message) const noexcept override { - records.push_back(Record{level, trace_id, 0, message}); - } - void Log(LogLevel level, uint64_t trace_id, uint64_t span_id, ot::string_view message) const - noexcept override { - records.push_back(Record{level, trace_id, span_id, message}); - } - void Trace(ot::string_view message) const noexcept override { - records.push_back(Record{LogLevel::debug, 0, 0, message}); - } - void Trace(uint64_t trace_id, ot::string_view message) const noexcept override { - records.push_back(Record{LogLevel::debug, trace_id, 0, message}); - } - void Trace(uint64_t trace_id, uint64_t span_id, ot::string_view message) const - noexcept override { - records.push_back(Record{LogLevel::debug, trace_id, span_id, message}); - } -}; - // Exists just so we can see that opts was set correctly. struct MockTracer : public Tracer { TracerOptions opts;