40 std::atomic<bool> halted{
true};
42 std::atomic<bool> hasFile{
false};
43 std::ofstream outFile;
44 std::shared_ptr<LoggingCore> logCore;
46 std::atomic<int> consoleLevel{
53 explicit Logger(std::shared_ptr<LoggingCore> core);
58 void openFile(
const std::string& file);
74 void log(
int level, std::string logMessage);
90 void logFunction(std::string&& message);
96 std::ofstream outFile;
105 explicit LoggerNoThread(
const std::shared_ptr<LoggingCore>& core);
108 void openFile(
const std::string& file);
124 void log(
int level,
const std::string& logMessage);
void flush()
Definition: logger.cpp:164
void closeFile()
Definition: logger.cpp:135
void changeLevels(int cLevel, int fLevel)
Definition: logger.cpp:146
int fileLevel
level below which we need to print to a file
Definition: logger.h:99
void log(const std::string &logMessage)
Definition: logger.h:128
int consoleLevel
level below which we need to print to the console
Definition: logger.h:98
bool isRunning() const
Definition: logger.cpp:172
void log(int level, const std::string &logMessage)
Definition: logger.cpp:152
void startLogging()
Definition: logger.h:116
void openFile(const std::string &file)
Definition: logger.cpp:130
Logger()
Definition: logger.cpp:28
void startLogging()
Definition: logger.h:67
void log(int level, std::string logMessage)
Definition: logger.cpp:82
~Logger()
Definition: logger.cpp:39
void closeFile()
Definition: logger.cpp:53
bool isRunning() const
Definition: logger.cpp:96
void log(std::string logMessage)
Definition: logger.h:78
void openFile(const std::string &file)
Definition: logger.cpp:43
void changeLevels(int cLevel, int fLevel)
Definition: logger.cpp:76
void haltLogging()
Definition: logger.cpp:69
void flush()
Definition: logger.cpp:92
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
constexpr int log_everything
level that will log everything
Definition: logger.h:32
constexpr int always_log
level that will always log
Definition: logger.h:31