webserv/webserv/log/StdoutChannel.hpp
whaffman bac66d2a0b Implement logging level support in Channel and its derived classes
- Added LogLevel parameter to Channel constructor and updated derived classes (FileChannel, StdoutChannel) to accept it.
- Modified log methods to respect the logging level, preventing lower priority logs from being processed.
- Updated Log class to set logging levels for stdout and file channels.
- Adjusted main function to initialize logging with specified levels.
2025-09-21 20:49:25 +02:00

19 lines
578 B
C++

#pragma once
#include <webserv/log/Channel.hpp>
class StdoutChannel : public Channel
{
public:
StdoutChannel(LogLevel logLevel = LogLevel::LOGLVL_TRACE);
StdoutChannel(const StdoutChannel &other) = delete;
StdoutChannel(const StdoutChannel &&other) = delete;
StdoutChannel &operator=(const StdoutChannel &other) = delete;
StdoutChannel &&operator=(const StdoutChannel &&other) = delete;
~StdoutChannel();
void log(LogLevel &logLevel, const std::string &message,
const std::map<std::string, std::string> &context = {}) override;
};