summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar ameerj2021-06-14 22:23:27 -0400
committerGravatar ameerj2021-06-14 22:23:27 -0400
commit422a15ee758d3363ce0fa8bda185e34b5702c2a0 (patch)
tree2772d78ef38c55229da1cea67b2a34f85596470c
parentMerge pull request #6456 from Morph1984/very-important-changes (diff)
downloadyuzu-422a15ee758d3363ce0fa8bda185e34b5702c2a0.tar.gz
yuzu-422a15ee758d3363ce0fa8bda185e34b5702c2a0.tar.xz
yuzu-422a15ee758d3363ce0fa8bda185e34b5702c2a0.zip
lm: Demote guest logs to LOG_DEBUG
Guest logs are not very useful, as they are intended for use by the game developers during development. As such, they provide little meaning to be logged by yuzu and tend to overwhelm the log output at times.
-rw-r--r--src/core/hle/service/lm/lm.cpp47
1 files changed, 20 insertions, 27 deletions
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index 311e4fb2d..794504314 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -51,6 +51,24 @@ struct hash<Service::LM::LogPacketHeaderEntry> {
51} // namespace std 51} // namespace std
52 52
53namespace Service::LM { 53namespace Service::LM {
54namespace {
55std::string_view NameOf(LogSeverity severity) {
56 switch (severity) {
57 case LogSeverity::Trace:
58 return "TRACE";
59 case LogSeverity::Info:
60 return "INFO";
61 case LogSeverity::Warning:
62 return "WARNING";
63 case LogSeverity::Error:
64 return "ERROR";
65 case LogSeverity::Fatal:
66 return "FATAL";
67 default:
68 return "UNKNOWN";
69 }
70}
71} // Anonymous namespace
54 72
55enum class LogDestination : u32 { 73enum class LogDestination : u32 {
56 TargetManager = 1 << 0, 74 TargetManager = 1 << 0,
@@ -262,33 +280,8 @@ private:
262 if (text_log) { 280 if (text_log) {
263 output_log += fmt::format("Log Text: {}\n", *text_log); 281 output_log += fmt::format("Log Text: {}\n", *text_log);
264 } 282 }
265 283 LOG_DEBUG(Service_LM, "LogManager {} ({}):\n{}", NameOf(entry.severity),
266 switch (entry.severity) { 284 DestinationToString(destination), output_log);
267 case LogSeverity::Trace:
268 LOG_DEBUG(Service_LM, "LogManager TRACE ({}):\n{}", DestinationToString(destination),
269 output_log);
270 break;
271 case LogSeverity::Info:
272 LOG_INFO(Service_LM, "LogManager INFO ({}):\n{}", DestinationToString(destination),
273 output_log);
274 break;
275 case LogSeverity::Warning:
276 LOG_WARNING(Service_LM, "LogManager WARNING ({}):\n{}",
277 DestinationToString(destination), output_log);
278 break;
279 case LogSeverity::Error:
280 LOG_ERROR(Service_LM, "LogManager ERROR ({}):\n{}", DestinationToString(destination),
281 output_log);
282 break;
283 case LogSeverity::Fatal:
284 LOG_CRITICAL(Service_LM, "LogManager FATAL ({}):\n{}", DestinationToString(destination),
285 output_log);
286 break;
287 default:
288 LOG_CRITICAL(Service_LM, "LogManager UNKNOWN ({}):\n{}",
289 DestinationToString(destination), output_log);
290 break;
291 }
292 } 285 }
293 286
294 static std::string DestinationToString(LogDestination destination) { 287 static std::string DestinationToString(LogDestination destination) {