MathLogger.h 344 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <string>
  3. #include "MathFormatting.h"
  4. #include "MathOutput.h"
  5. namespace mathlogger {
  6. struct Logger
  7. {
  8. LogLevel level = INFO;
  9. void SetLevel(LogLevel new_level) { level = new_level; }
  10. void Log(std::string const& message)
  11. {
  12. std::string formatted = FormatLog(level, message);
  13. WriteLog(formatted);
  14. }
  15. };
  16. }