mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-06-01 10:04:00 +00:00
logging updates
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
* a bounded channel for later processing by the dispatcher.
|
||||
*/
|
||||
|
||||
#ifndef BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_CHANNEL_LOGGER_H_
|
||||
#define BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_CHANNEL_LOGGER_H_
|
||||
#ifndef BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_PRODUCER_H_
|
||||
#define BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_PRODUCER_H_
|
||||
|
||||
#include <string_view>
|
||||
|
||||
@@ -24,30 +24,29 @@
|
||||
*/
|
||||
class LogProducer final : public ILogger {
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a channel-backed producer.
|
||||
*
|
||||
* @param channel Reference to the bounded channel used for log transfer.
|
||||
*/
|
||||
explicit LogProducer(BoundedChannel<LogEntry>& channel);
|
||||
/**
|
||||
* @brief Construct a channel-backed producer.
|
||||
*
|
||||
* @param channel Reference to the bounded channel used for log transfer.
|
||||
*/
|
||||
explicit LogProducer(BoundedChannel<LogEntry>& channel);
|
||||
|
||||
LogProducer(const LogProducer&) = delete;
|
||||
LogProducer& operator=(const LogProducer&) = delete;
|
||||
LogProducer(LogProducer&&) = delete;
|
||||
LogProducer& operator=(LogProducer&&) = delete;
|
||||
LogProducer(const LogProducer&) = delete;
|
||||
LogProducer& operator=(const LogProducer&) = delete;
|
||||
LogProducer(LogProducer&&) = delete;
|
||||
LogProducer& operator=(LogProducer&&) = delete;
|
||||
|
||||
~LogProducer() override = default;
|
||||
~LogProducer() override = default;
|
||||
|
||||
/**
|
||||
* @brief Queue a log message for asynchronous processing.
|
||||
*
|
||||
* Blocks while the channel applies backpressure.
|
||||
*/
|
||||
void Log(LogLevel level, PipelinePhase phase,
|
||||
std::string_view message) override;
|
||||
/**
|
||||
* @brief Queue a log message for asynchronous processing.
|
||||
*
|
||||
* Blocks while the channel applies backpressure.
|
||||
*/
|
||||
void Log(LogEntry const& entry) override;
|
||||
|
||||
private:
|
||||
BoundedChannel<LogEntry>& channel_;
|
||||
BoundedChannel<LogEntry>& channel_;
|
||||
};
|
||||
|
||||
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_CHANNEL_LOGGER_H_
|
||||
#endif // BIERGARTEN_PIPELINE_INCLUDES_SERVICES_LOGGING_LOG_PRODUCER_H_
|
||||
|
||||
Reference in New Issue
Block a user