Debian Codegraph @

Help/guide/tutorial/Step9/MathFunctions/MathLogger/MathLogger.h

raw
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 }