summaryrefslogtreecommitdiff
path: root/src/common/logging/log_entry.h
diff options
context:
space:
mode:
authorGravatar ameerj2021-09-30 16:11:47 -0400
committerGravatar ameerj2021-10-01 20:48:49 -0400
commit5daf3abe65bb168e4274049c26e7f309b8f10e82 (patch)
treef62a59154b2ab0460e83f1bbfb02f93a3364ec3f /src/common/logging/log_entry.h
parentMerge pull request #7061 from ameerj/dma-buffer-misc (diff)
downloadyuzu-5daf3abe65bb168e4274049c26e7f309b8f10e82.tar.gz
yuzu-5daf3abe65bb168e4274049c26e7f309b8f10e82.tar.xz
yuzu-5daf3abe65bb168e4274049c26e7f309b8f10e82.zip
common/logging: Move Log::Entry declaration to a separate header
This reduces the load of requiring to include std::chrono in all files which include log.h
Diffstat (limited to 'src/common/logging/log_entry.h')
-rw-r--r--src/common/logging/log_entry.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/common/logging/log_entry.h b/src/common/logging/log_entry.h
new file mode 100644
index 000000000..dd6f44841
--- /dev/null
+++ b/src/common/logging/log_entry.h
@@ -0,0 +1,28 @@
1// Copyright 2021 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <chrono>
8
9#include "common/logging/types.h"
10
11namespace Common::Log {
12
13/**
14 * A log entry. Log entries are store in a structured format to permit more varied output
15 * formatting on different frontends, as well as facilitating filtering and aggregation.
16 */
17struct Entry {
18 std::chrono::microseconds timestamp;
19 Class log_class{};
20 Level log_level{};
21 const char* filename = nullptr;
22 unsigned int line_num = 0;
23 std::string function;
24 std::string message;
25 bool final_entry = false;
26};
27
28} // namespace Common::Log