This commit is contained in:
Aaron Po
2026-06-21 13:13:02 -04:00
parent cbadd3bb59
commit 75e0b1aa94
27 changed files with 313 additions and 298 deletions

View File

@@ -11,8 +11,8 @@
#include <string>
#include <unordered_map>
#include "data_model/models.h"
#include "../datetime/date_time_provider.h"
#include "data_model/models.h"
#include "export_service.h"
#include "sqlite_export_service_helpers.h"

View File

@@ -34,9 +34,9 @@ enum class LogLevel {
* pipeline that emitted it.
*/
enum class PipelinePhase {
Startup, ///< Initialization and validation.
Enrichment, ///< Location/context enrichment (e.g. Wikipedia lookups).
UserGeneration, ///< User profile generation.
Startup, ///< Initialization and validation.
Enrichment, ///< Location/context enrichment (e.g. Wikipedia lookups).
UserGeneration, ///< User profile generation.
BreweryAndBeerGeneration, ///< Brewery and beer data generation.
CheckinGeneration, ///< Checkin (visit) record generation.
RatingGeneration, ///< Rating and review generation.
@@ -46,7 +46,8 @@ enum class PipelinePhase {
/**
* @struct LogDTO
* @brief User-provided subset of log fields. Used to capture call-site info transparently.
* @brief User-provided subset of log fields. Used to capture call-site info
* transparently.
*/
struct LogDTO {
LogLevel level;
@@ -74,7 +75,6 @@ struct LogEntry {
/// @brief Thread responsible for emitting the log.
std::thread::id thread_id{};
/// @brief Severity level of this entry.
LogLevel level;
@@ -83,7 +83,6 @@ struct LogEntry {
/// @brief Log message text.
std::string message;
};
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_ENTRY_H_

View File

@@ -39,7 +39,8 @@ class ILogger {
*/
void Log(LogDTO payload,
std::source_location origin = std::source_location::current(),
std::chrono::system_clock::time_point timestamp = std::chrono::system_clock::now(),
std::chrono::system_clock::time_point timestamp =
std::chrono::system_clock::now(),
std::thread::id thread_id = std::this_thread::get_id()) {
LogEntry entry;
entry.timestamp = timestamp;