Skip to content

Commit

Permalink
remove merge artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoffredo committed Mar 30, 2022
1 parent 2925d04 commit 4373b58
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions test/mocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Record> 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;
Expand Down

0 comments on commit 4373b58

Please sign in to comment.