Files
OrdonnancementCorrectif/src/General/Logs/Loggers/StreamLogger.h
T

42 lines
1.3 KiB
C++
Raw Normal View History

2026-06-03 22:48:34 +02:00
#ifndef STREAMLOGGER_H
#define STREAMLOGGER_H
#include <iostream>
#include <string>
#include "Logger.h"
namespace loggerlib {
/*! @file StreamLogger.h*/
/**
* @class StreamLogger
* @brief Classe dfinissant un logger concret, communiquant par l'criture dans un stream
*/
class StreamLogger : public Logger {
private:
/**
* @brief le chemin du fichier de log dans lequel crire
*/
unsigned int outStream;
std::ostream outStreamObject;
//static std::unordered_map<unsigned int, std::ostream*> strandardsIndex;
public:
/**
* @brief Constructeur par dfaut, inutilisable
*/
StreamLogger(unsigned int out, bool show, bool json, std::vector<unsigned int>& typesV);
/**
* @brief Constructeur de confort, le chemin du fichier de log est donn en paramtre
* @param Le chemin du fichier de log dans lequel crire
*/
//StreamLogger(std::ostream& outStream);
/**
* @brief Surcharge de la fonction abstraite notify
* @param message le message crire dans le stream
* Envoi du message : ici dans le fichier m_outStream
*/
void notify(const std::string& timestamp, ELOGGER_TYPES type, const std::string& message) override;
};
}
#endif