update doxygen comments for concurrent logger

This commit is contained in:
Aaron Po
2026-05-14 21:21:28 -04:00
parent 74f11b57e2
commit a4968eb043
6 changed files with 161 additions and 88 deletions

View File

@@ -1,10 +1,9 @@
/**
* @file services/logging/log_entry.h
* @brief POD struct representing a single log event in the pipeline.
* @brief POD log entry structure for asynchronous pipeline logging.
*
* 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.
* Intent: Lightweight, move-safe data transfer between logging producer
* (ChannelLogger) and consumer (LogConsumer) via BoundedChannel<LogEntry>.
*/
#ifndef BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_ENTRY_H_
@@ -13,29 +12,54 @@
#include <chrono>
#include <string>
/**
* @enum LogLevel
* @brief Severity levels for log entries.
*/
enum class LogLevel {
Debug,
Info,
Warn,
Error,
Debug, ///< Development/debugging information.
Info, ///< General informational messages.
Warn, ///< Warning conditions.
Error, ///< Error conditions.
};
/**
* @enum PipelinePhase
* @brief Execution phases for contextual logging.
*
* Used to tag log entries by their processing stage, enabling phase-specific
* analysis and filtering of the execution timeline.
*/
enum class PipelinePhase {
Startup,
UserGeneration,
BreweryAndBeerGeneration,
CheckinGeneration,
RatingGeneration,
FollowGeneration,
Teardown,
Startup, ///< Initialization and validation.
UserGeneration, ///< User profile generation.
BreweryAndBeerGeneration, ///< Brewery and beer data generation.
CheckinGeneration, ///< Checkin (visit) record generation.
RatingGeneration, ///< Rating and review generation.
FollowGeneration, ///< Follow relationship generation.
Teardown, ///< Finalization and cleanup.
};
/**
* @struct LogEntry
* @brief Single log event for asynchronous processing.
*
* All fields are value types, allowing safe move semantics across
* BoundedChannel without shared ownership or synchronization overhead.
*/
struct LogEntry {
std::chrono::system_clock::time_point timestamp =
std::chrono::system_clock::now();
LogLevel level;
PipelinePhase phase;
std::string message;
/// @brief Timestamp when entry was created.
std::chrono::system_clock::time_point timestamp =
std::chrono::system_clock::now();
/// @brief Severity level of this entry.
LogLevel level;
/// @brief Pipeline phase when entry was logged.
PipelinePhase phase;
/// @brief Log message text.
std::string message;
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_ENTRY_H_