mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 01:54:00 +00:00
Implement pipeline logging with bounded channels and orchestrator integration
This commit is contained in:
41
tooling/pipeline/includes/services/logging/log_entry.h
Normal file
41
tooling/pipeline/includes/services/logging/log_entry.h
Normal 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_
|
||||
Reference in New Issue
Block a user