mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
updates
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* @brief LogProducer implementation for asynchronous pipeline logging.
|
||||
*/
|
||||
|
||||
#include "services/logging/log_producer.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@@ -10,15 +12,13 @@
|
||||
|
||||
#include "concurrency/bounded_channel.h"
|
||||
#include "services/logging/log_entry.h"
|
||||
#include "services/logging/log_producer.h"
|
||||
|
||||
LogProducer::LogProducer(BoundedChannel<LogEntry>& channel)
|
||||
: channel_(channel) {}
|
||||
|
||||
void LogProducer::Log(LogLevel level, PipelinePhase phase,
|
||||
const std::string_view message) {
|
||||
const std::string_view message) {
|
||||
channel_.Send(LogEntry{.timestamp = std::chrono::system_clock::now(),
|
||||
.calling_thread_id = std::this_thread::get_id(),
|
||||
.level = level,
|
||||
.phase = phase,
|
||||
.message = std::string(message)});
|
||||
|
||||
Reference in New Issue
Block a user