log_entry.h 690 B

12345678910111213141516171819202122232425262728
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <chrono>
  6. #include "common/logging/types.h"
  7. namespace Common::Log {
  8. /**
  9. * A log entry. Log entries are store in a structured format to permit more varied output
  10. * formatting on different frontends, as well as facilitating filtering and aggregation.
  11. */
  12. struct Entry {
  13. std::chrono::microseconds timestamp;
  14. Class log_class{};
  15. Level log_level{};
  16. const char* filename = nullptr;
  17. unsigned int line_num = 0;
  18. std::string function;
  19. std::string message;
  20. bool final_entry = false;
  21. };
  22. } // namespace Common::Log