summaryrefslogtreecommitdiff
path: root/src/common/logging/backend.cpp
diff options
context:
space:
mode:
authorGravatar Morph2021-06-13 10:31:47 -0400
committerGravatar Morph2021-06-13 11:05:58 -0400
commit391e823c797ba61791eeb98180ed5ea657b7d4c4 (patch)
tree31b852202d266375808c79c9f447791db36407bf /src/common/logging/backend.cpp
parentcommon: logging: backend: Wrap IOFile in a unique_ptr (diff)
downloadyuzu-391e823c797ba61791eeb98180ed5ea657b7d4c4.tar.gz
yuzu-391e823c797ba61791eeb98180ed5ea657b7d4c4.tar.xz
yuzu-391e823c797ba61791eeb98180ed5ea657b7d4c4.zip
common: logging: Restructure backend code
Diffstat (limited to 'src/common/logging/backend.cpp')
-rw-r--r--src/common/logging/backend.cpp129
1 files changed, 0 insertions, 129 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 756b08dfe..d5cff400f 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -198,135 +198,6 @@ void DebuggerBackend::Write(const Entry& entry) {
198#endif 198#endif
199} 199}
200 200
201/// Macro listing all log classes. Code should define CLS and SUB as desired before invoking this.
202#define ALL_LOG_CLASSES() \
203 CLS(Log) \
204 CLS(Common) \
205 SUB(Common, Filesystem) \
206 SUB(Common, Memory) \
207 CLS(Core) \
208 SUB(Core, ARM) \
209 SUB(Core, Timing) \
210 CLS(Config) \
211 CLS(Debug) \
212 SUB(Debug, Emulated) \
213 SUB(Debug, GPU) \
214 SUB(Debug, Breakpoint) \
215 SUB(Debug, GDBStub) \
216 CLS(Kernel) \
217 SUB(Kernel, SVC) \
218 CLS(Service) \
219 SUB(Service, ACC) \
220 SUB(Service, Audio) \
221 SUB(Service, AM) \
222 SUB(Service, AOC) \
223 SUB(Service, APM) \
224 SUB(Service, ARP) \
225 SUB(Service, BCAT) \
226 SUB(Service, BPC) \
227 SUB(Service, BGTC) \
228 SUB(Service, BTDRV) \
229 SUB(Service, BTM) \
230 SUB(Service, Capture) \
231 SUB(Service, ERPT) \
232 SUB(Service, ETicket) \
233 SUB(Service, EUPLD) \
234 SUB(Service, Fatal) \
235 SUB(Service, FGM) \
236 SUB(Service, Friend) \
237 SUB(Service, FS) \
238 SUB(Service, GRC) \
239 SUB(Service, HID) \
240 SUB(Service, IRS) \
241 SUB(Service, LBL) \
242 SUB(Service, LDN) \
243 SUB(Service, LDR) \
244 SUB(Service, LM) \
245 SUB(Service, Migration) \
246 SUB(Service, Mii) \
247 SUB(Service, MM) \
248 SUB(Service, NCM) \
249 SUB(Service, NFC) \
250 SUB(Service, NFP) \
251 SUB(Service, NIFM) \
252 SUB(Service, NIM) \
253 SUB(Service, NPNS) \
254 SUB(Service, NS) \
255 SUB(Service, NVDRV) \
256 SUB(Service, OLSC) \
257 SUB(Service, PCIE) \
258 SUB(Service, PCTL) \
259 SUB(Service, PCV) \
260 SUB(Service, PM) \
261 SUB(Service, PREPO) \
262 SUB(Service, PSC) \
263 SUB(Service, PSM) \
264 SUB(Service, SET) \
265 SUB(Service, SM) \
266 SUB(Service, SPL) \
267 SUB(Service, SSL) \
268 SUB(Service, TCAP) \
269 SUB(Service, Time) \
270 SUB(Service, USB) \
271 SUB(Service, VI) \
272 SUB(Service, WLAN) \
273 CLS(HW) \
274 SUB(HW, Memory) \
275 SUB(HW, LCD) \
276 SUB(HW, GPU) \
277 SUB(HW, AES) \
278 CLS(IPC) \
279 CLS(Frontend) \
280 CLS(Render) \
281 SUB(Render, Software) \
282 SUB(Render, OpenGL) \
283 SUB(Render, Vulkan) \
284 CLS(Audio) \
285 SUB(Audio, DSP) \
286 SUB(Audio, Sink) \
287 CLS(Input) \
288 CLS(Network) \
289 CLS(Loader) \
290 CLS(CheatEngine) \
291 CLS(Crypto) \
292 CLS(WebService)
293
294// GetClassName is a macro defined by Windows.h, grrr...
295const char* GetLogClassName(Class log_class) {
296 switch (log_class) {
297#define CLS(x) \
298 case Class::x: \
299 return #x;
300#define SUB(x, y) \
301 case Class::x##_##y: \
302 return #x "." #y;
303 ALL_LOG_CLASSES()
304#undef CLS
305#undef SUB
306 case Class::Count:
307 break;
308 }
309 return "Invalid";
310}
311
312const char* GetLevelName(Level log_level) {
313#define LVL(x) \
314 case Level::x: \
315 return #x
316 switch (log_level) {
317 LVL(Trace);
318 LVL(Debug);
319 LVL(Info);
320 LVL(Warning);
321 LVL(Error);
322 LVL(Critical);
323 case Level::Count:
324 break;
325 }
326#undef LVL
327 return "Invalid";
328}
329
330void SetGlobalFilter(const Filter& filter) { 201void SetGlobalFilter(const Filter& filter) {
331 Impl::Instance().SetGlobalFilter(filter); 202 Impl::Instance().SetGlobalFilter(filter);
332} 203}