Implement pipeline logging with bounded channels and orchestrator integration

This commit is contained in:
Aaron Po
2026-05-14 21:08:17 -04:00
parent f93b14897b
commit 74f11b57e2
16 changed files with 361 additions and 61 deletions

View File

@@ -0,0 +1,41 @@
/**
* @file services/logging/log_entry.h
* @brief POD struct representing a single log event in the pipeline.
*
* LogEntry is produced by PipelineLogger and consumed by LogWorker via
* BoundedChannel<LogEntry>. All fields are value types so entries are
* safely movable across the channel without shared ownership.
*/
#ifndef BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_ENTRY_H_
#define BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_ENTRY_H_
#include <chrono>
#include <string>
enum class LogLevel {
Debug,
Info,
Warn,
Error,
};
enum class PipelinePhase {
Startup,
UserGeneration,
BreweryAndBeerGeneration,
CheckinGeneration,
RatingGeneration,
FollowGeneration,
Teardown,
};
struct LogEntry {
std::chrono::system_clock::time_point timestamp =
std::chrono::system_clock::now();
LogLevel level;
PipelinePhase phase;
std::string message;
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_ENTRY_H_