log_entry.h 641 B

1234567891011121314151617181920212223242526
  1. // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <chrono>
  5. #include "common/logging/types.h"
  6. namespace Common::Log {
  7. /**
  8. * A log entry. Log entries are store in a structured format to permit more varied output
  9. * formatting on different frontends, as well as facilitating filtering and aggregation.
  10. */
  11. struct Entry {
  12. std::chrono::microseconds timestamp;
  13. Class log_class{};
  14. Level log_level{};
  15. const char* filename = nullptr;
  16. unsigned int line_num = 0;
  17. std::string function;
  18. std::string message;
  19. };
  20. } // namespace Common::Log