36 void run(std::stop_token st);
43 void log(
const std::string& logEntry);
63 std::chrono::system_clock::time_point
today;
78 std::shared_mutex
mtx;
std::string key
This key must be unique on the server on which it is plugged.
Definition Channel.h:98
Channel(const std::string &key)
Constructor of the Channel's class.
void getStream(const std::string &name)
Used to load/create the log file.
std::shared_mutex mtx
Mutex for the log callback.
Definition LogChannel.h:78
void run(std::stop_token st)
Run method of the Channel, process the given events.
std::string prefix
Log file's prefix.
Definition LogChannel.h:68
std::chrono::system_clock::time_point today
Today's date.
Definition LogChannel.h:63
LogChannel(const std::string &key, const std::string &logFilePrefix)
Constructor of the LogChannel.
void log(const std::string &logEntry)
Callback which can be used trough the group (based on this channel's key) by other channels.
std::ofstream stream
Log file's stream.
Definition LogChannel.h:73
void loadTime(std::stringstream &ss)
Load in the given streamstring the current time in the right format, and change the log file if neede...