You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
709 B

  1. #pragma once
  2. #include <chrono>
  3. #include <thread>
  4. namespace utl {
  5. namespace logging {
  6. enum class log_level
  7. {
  8. debug = 0,
  9. info,
  10. warn,
  11. error,
  12. };
  13. struct data
  14. {
  15. log_level level;
  16. std::chrono::steady_clock::time_point time;
  17. void* sender;
  18. std::thread::id thread;
  19. const char* file;
  20. int line;
  21. std::string name;
  22. std::string message;
  23. };
  24. using data_ptr_s = std::shared_ptr<data>;
  25. }
  26. }