diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/lm/lm.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 2e99ddf51..098da2a41 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp | |||
| @@ -92,7 +92,11 @@ private: | |||
| 92 | 92 | ||
| 93 | // Parse out log metadata | 93 | // Parse out log metadata |
| 94 | u32 line{}; | 94 | u32 line{}; |
| 95 | std::string message, filename, function; | 95 | std::string module; |
| 96 | std::string message; | ||
| 97 | std::string filename; | ||
| 98 | std::string function; | ||
| 99 | std::string thread; | ||
| 96 | while (addr < end_addr) { | 100 | while (addr < end_addr) { |
| 97 | const Field field{static_cast<Field>(Memory::Read8(addr++))}; | 101 | const Field field{static_cast<Field>(Memory::Read8(addr++))}; |
| 98 | const size_t length{Memory::Read8(addr++)}; | 102 | const size_t length{Memory::Read8(addr++)}; |
| @@ -102,6 +106,8 @@ private: | |||
| 102 | } | 106 | } |
| 103 | 107 | ||
| 104 | switch (field) { | 108 | switch (field) { |
| 109 | case Field::Skip: | ||
| 110 | break; | ||
| 105 | case Field::Message: | 111 | case Field::Message: |
| 106 | message = Memory::ReadCString(addr, length); | 112 | message = Memory::ReadCString(addr, length); |
| 107 | break; | 113 | break; |
| @@ -114,6 +120,12 @@ private: | |||
| 114 | case Field::Function: | 120 | case Field::Function: |
| 115 | function = Memory::ReadCString(addr, length); | 121 | function = Memory::ReadCString(addr, length); |
| 116 | break; | 122 | break; |
| 123 | case Field::Module: | ||
| 124 | module = Memory::ReadCString(addr, length); | ||
| 125 | break; | ||
| 126 | case Field::Thread: | ||
| 127 | thread = Memory::ReadCString(addr, length); | ||
| 128 | break; | ||
| 117 | } | 129 | } |
| 118 | 130 | ||
| 119 | addr += length; | 131 | addr += length; |
| @@ -128,12 +140,18 @@ private: | |||
| 128 | if (!filename.empty()) { | 140 | if (!filename.empty()) { |
| 129 | log_stream << filename << ':'; | 141 | log_stream << filename << ':'; |
| 130 | } | 142 | } |
| 143 | if (!module.empty()) { | ||
| 144 | log_stream << module << ':'; | ||
| 145 | } | ||
| 131 | if (!function.empty()) { | 146 | if (!function.empty()) { |
| 132 | log_stream << function << ':'; | 147 | log_stream << function << ':'; |
| 133 | } | 148 | } |
| 134 | if (line) { | 149 | if (line) { |
| 135 | log_stream << std::to_string(line) << ':'; | 150 | log_stream << std::to_string(line) << ':'; |
| 136 | } | 151 | } |
| 152 | if (!thread.empty()) { | ||
| 153 | log_stream << thread << ':'; | ||
| 154 | } | ||
| 137 | if (log_stream.str().length() > 0 && log_stream.str().back() == ':') { | 155 | if (log_stream.str().length() > 0 && log_stream.str().back() == ':') { |
| 138 | log_stream << ' '; | 156 | log_stream << ' '; |
| 139 | } | 157 | } |
| @@ -142,7 +160,7 @@ private: | |||
| 142 | if (header.IsTailLog()) { | 160 | if (header.IsTailLog()) { |
| 143 | switch (header.severity) { | 161 | switch (header.severity) { |
| 144 | case MessageHeader::Severity::Trace: | 162 | case MessageHeader::Severity::Trace: |
| 145 | LOG_TRACE(Debug_Emulated, "{}", log_stream.str()); | 163 | LOG_DEBUG(Debug_Emulated, "{}", log_stream.str()); |
| 146 | break; | 164 | break; |
| 147 | case MessageHeader::Severity::Info: | 165 | case MessageHeader::Severity::Info: |
| 148 | LOG_INFO(Debug_Emulated, "{}", log_stream.str()); | 166 | LOG_INFO(Debug_Emulated, "{}", log_stream.str()); |