diff options
| author | 2019-06-28 21:02:50 -0400 | |
|---|---|---|
| committer | 2019-06-28 21:02:50 -0400 | |
| commit | 554e2f2f983824bee174465c79b9ad3c27e8208f (patch) | |
| tree | 0ab536c5287b8715928991ccf38c3963b25a564f /src/core/reporter.cpp | |
| parent | fsp-srv: Implement OutputAccessLogToSdCard (diff) | |
| download | yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.gz yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.tar.xz yuzu-554e2f2f983824bee174465c79b9ad3c27e8208f.zip | |
reporter: Add report class for filesystem access logs
Diffstat (limited to 'src/core/reporter.cpp')
| -rw-r--r-- | src/core/reporter.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index 774022569..059467318 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp | |||
| @@ -335,6 +335,24 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result, | |||
| 335 | SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); | 335 | SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); |
| 336 | } | 336 | } |
| 337 | 337 | ||
| 338 | void Reporter::SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode, | ||
| 339 | std::string log_message) const { | ||
| 340 | if (!IsReportingEnabled()) | ||
| 341 | return; | ||
| 342 | |||
| 343 | const auto timestamp = GetTimestamp(); | ||
| 344 | const auto title_id = system.CurrentProcess()->GetTitleID(); | ||
| 345 | json out; | ||
| 346 | |||
| 347 | out["yuzu_version"] = GetYuzuVersionData(); | ||
| 348 | out["report_common"] = GetReportCommonData(title_id, RESULT_SUCCESS, timestamp); | ||
| 349 | |||
| 350 | out["log_mode"] = fmt::format("{:08X}", static_cast<u32>(log_mode)); | ||
| 351 | out["log_message"] = std::move(log_message); | ||
| 352 | |||
| 353 | SaveToFile(std::move(out), GetPath("filesystem_access_report", title_id, timestamp)); | ||
| 354 | } | ||
| 355 | |||
| 338 | void Reporter::SaveUserReport() const { | 356 | void Reporter::SaveUserReport() const { |
| 339 | if (!IsReportingEnabled()) | 357 | if (!IsReportingEnabled()) |
| 340 | return; | 358 | return; |