Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Help/guide/tutorial/Step8/MathFunctions/MathLogger/MathLogger.h
5022 views
1
#pragma once
2
3
#include <string>
4
5
#include "MathFormatting.h"
6
#include "MathOutput.h"
7
8
namespace mathlogger {
9
10
struct Logger
11
{
12
LogLevel level = INFO;
13
14
void SetLevel(LogLevel new_level) { level = new_level; }
15
void Log(std::string const& message)
16
{
17
std::string formatted = FormatLog(level, message);
18
WriteLog(formatted);
19
}
20
};
21
22
}
23
24