QuISP
Loading...
Searching...
No Matches
LoggerModule.h
Go to the documentation of this file.
1#pragma once
2#include <omnetpp.h>
3#include <spdlog/async.h>
4#include <spdlog/sinks/basic_file_sink.h>
5#include <spdlog/spdlog.h>
6#include <memory>
7#include "ILogger.h"
8
10
11enum class LoggerType {
12 Unknown,
15};
16
17class LoggerModule : public omnetpp::cSimpleModule {
18 public:
21 void initialize() override;
22 void finish() override;
24
25 protected:
26 std::shared_ptr<spdlog::logger> spdlog_logger;
28
29 static std::string trimQuotes(std::string s);
30 static LoggerType toLoggerType(const std::string& s);
31};
33} // namespace quisp::modules::Logger
Interface of Logger class. Logger class that inherits ILogger is responsible for logging simulation r...
Definition ILogger.h:22
Definition LoggerModule.h:17
~LoggerModule()
Definition LoggerModule.cc:12
LoggerModule()
Definition LoggerModule.cc:10
ILogger * getLogger()
Definition LoggerModule.cc:46
LoggerType logger_type
Definition LoggerModule.h:27
static std::string trimQuotes(std::string s)
Definition LoggerModule.cc:56
void finish() override
Definition LoggerModule.cc:40
std::shared_ptr< spdlog::logger > spdlog_logger
Definition LoggerModule.h:26
static LoggerType toLoggerType(const std::string &s)
Definition LoggerModule.cc:63
void initialize() override
Definition LoggerModule.cc:19
Definition DisabledLogger.h:4
LoggerType
Definition LoggerModule.h:11
Define_Module(LoggerModule)