initialCommit 4 ans en retard
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#ifndef STREAMLOGGER_H
|
||||
#define STREAMLOGGER_H
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "Logger.h"
|
||||
|
||||
namespace loggerlib {
|
||||
|
||||
/*! @file StreamLogger.h*/
|
||||
|
||||
/**
|
||||
* @class StreamLogger
|
||||
* @brief Classe d�finissant 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 d�faut, 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 param�tre
|
||||
* @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
|
||||
Reference in New Issue
Block a user