summaryrefslogtreecommitdiff
path: root/src/common/logging/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/logging/log.h')
-rw-r--r--src/common/logging/log.h120
1 files changed, 1 insertions, 119 deletions
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index 1f0f8db52..8d43eddc7 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -5,7 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <fmt/format.h> 7#include <fmt/format.h>
8#include "common/common_types.h" 8#include "common/logging/types.h"
9 9
10namespace Common::Log { 10namespace Common::Log {
11 11
@@ -18,124 +18,6 @@ constexpr const char* TrimSourcePath(std::string_view source) {
18 return source.data() + idx; 18 return source.data() + idx;
19} 19}
20 20
21/// Specifies the severity or level of detail of the log message.
22enum class Level : u8 {
23 Trace, ///< Extremely detailed and repetitive debugging information that is likely to
24 ///< pollute logs.
25 Debug, ///< Less detailed debugging information.
26 Info, ///< Status information from important points during execution.
27 Warning, ///< Minor or potential problems found during execution of a task.
28 Error, ///< Major problems found during execution of a task that prevent it from being
29 ///< completed.
30 Critical, ///< Major problems during execution that threaten the stability of the entire
31 ///< application.
32
33 Count ///< Total number of logging levels
34};
35
36typedef u8 ClassType;
37
38/**
39 * Specifies the sub-system that generated the log message.
40 *
41 * @note If you add a new entry here, also add a corresponding one to `ALL_LOG_CLASSES` in
42 * backend.cpp.
43 */
44enum class Class : ClassType {
45 Log, ///< Messages about the log system itself
46 Common, ///< Library routines
47 Common_Filesystem, ///< Filesystem interface library
48 Common_Memory, ///< Memory mapping and management functions
49 Core, ///< LLE emulation core
50 Core_ARM, ///< ARM CPU core
51 Core_Timing, ///< CoreTiming functions
52 Config, ///< Emulator configuration (including commandline)
53 Debug, ///< Debugging tools
54 Debug_Emulated, ///< Debug messages from the emulated programs
55 Debug_GPU, ///< GPU debugging tools
56 Debug_Breakpoint, ///< Logging breakpoints and watchpoints
57 Debug_GDBStub, ///< GDB Stub
58 Kernel, ///< The HLE implementation of the CTR kernel
59 Kernel_SVC, ///< Kernel system calls
60 Service, ///< HLE implementation of system services. Each major service
61 ///< should have its own subclass.
62 Service_ACC, ///< The ACC (Accounts) service
63 Service_AM, ///< The AM (Applet manager) service
64 Service_AOC, ///< The AOC (AddOn Content) service
65 Service_APM, ///< The APM (Performance) service
66 Service_ARP, ///< The ARP service
67 Service_Audio, ///< The Audio (Audio control) service
68 Service_BCAT, ///< The BCAT service
69 Service_BGTC, ///< The BGTC (Background Task Controller) service
70 Service_BPC, ///< The BPC service
71 Service_BTDRV, ///< The Bluetooth driver service
72 Service_BTM, ///< The BTM service
73 Service_Capture, ///< The capture service
74 Service_ERPT, ///< The error reporting service
75 Service_ETicket, ///< The ETicket service
76 Service_EUPLD, ///< The error upload service
77 Service_Fatal, ///< The Fatal service
78 Service_FGM, ///< The FGM service
79 Service_Friend, ///< The friend service
80 Service_FS, ///< The FS (Filesystem) service
81 Service_GRC, ///< The game recording service
82 Service_HID, ///< The HID (Human interface device) service
83 Service_IRS, ///< The IRS service
84 Service_LBL, ///< The LBL (LCD backlight) service
85 Service_LDN, ///< The LDN (Local domain network) service
86 Service_LDR, ///< The loader service
87 Service_LM, ///< The LM (Logger) service
88 Service_Migration, ///< The migration service
89 Service_Mii, ///< The Mii service
90 Service_MM, ///< The MM (Multimedia) service
91 Service_NCM, ///< The NCM service
92 Service_NFC, ///< The NFC (Near-field communication) service
93 Service_NFP, ///< The NFP service
94 Service_NIFM, ///< The NIFM (Network interface) service
95 Service_NIM, ///< The NIM service
96 Service_NPNS, ///< The NPNS service
97 Service_NS, ///< The NS services
98 Service_NVDRV, ///< The NVDRV (Nvidia driver) service
99 Service_OLSC, ///< The OLSC service
100 Service_PCIE, ///< The PCIe service
101 Service_PCTL, ///< The PCTL (Parental control) service
102 Service_PCV, ///< The PCV service
103 Service_PM, ///< The PM service
104 Service_PREPO, ///< The PREPO (Play report) service
105 Service_PSC, ///< The PSC service
106 Service_PSM, ///< The PSM service
107 Service_SET, ///< The SET (Settings) service
108 Service_SM, ///< The SM (Service manager) service
109 Service_SPL, ///< The SPL service
110 Service_SSL, ///< The SSL service
111 Service_TCAP, ///< The TCAP service.
112 Service_Time, ///< The time service
113 Service_USB, ///< The USB (Universal Serial Bus) service
114 Service_VI, ///< The VI (Video interface) service
115 Service_WLAN, ///< The WLAN (Wireless local area network) service
116 HW, ///< Low-level hardware emulation
117 HW_Memory, ///< Memory-map and address translation
118 HW_LCD, ///< LCD register emulation
119 HW_GPU, ///< GPU control emulation
120 HW_AES, ///< AES engine emulation
121 IPC, ///< IPC interface
122 Frontend, ///< Emulator UI
123 Render, ///< Emulator video output and hardware acceleration
124 Render_Software, ///< Software renderer backend
125 Render_OpenGL, ///< OpenGL backend
126 Render_Vulkan, ///< Vulkan backend
127 Audio, ///< Audio emulation
128 Audio_DSP, ///< The HLE implementation of the DSP
129 Audio_Sink, ///< Emulator audio output backend
130 Loader, ///< ROM loader
131 CheatEngine, ///< Memory manipulation and engine VM functions
132 Crypto, ///< Cryptographic engine/functions
133 Input, ///< Input emulation
134 Network, ///< Network emulation
135 WebService, ///< Interface to yuzu Web Services
136 Count ///< Total number of logging classes
137};
138
139/// Logs a message to the global logger, using fmt 21/// Logs a message to the global logger, using fmt
140void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, 22void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename,
141 unsigned int line_num, const char* function, const char* format, 23 unsigned int line_num, const char* function, const char* format,