diff options
| author | 2019-07-07 21:39:40 -0400 | |
|---|---|---|
| committer | 2019-07-07 21:39:40 -0400 | |
| commit | 8f5aae30746f678eed69d8f311e9b5634a8dd12c (patch) | |
| tree | 3755447c918a345e88cca7a5e925543ea1a9fc4f /src/core/reporter.cpp | |
| parent | Merge pull request #2694 from FearlessTobi/patch-1 (diff) | |
| parent | fsp-srv: Implement GetAccessLogVersionInfo (diff) | |
| download | yuzu-8f5aae30746f678eed69d8f311e9b5634a8dd12c.tar.gz yuzu-8f5aae30746f678eed69d8f311e9b5634a8dd12c.tar.xz yuzu-8f5aae30746f678eed69d8f311e9b5634a8dd12c.zip | |
Merge pull request #2642 from DarkLordZach/fsp-log-2
fsp-srv: Implement Access Logging Functionality
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 6ea26fda7..5d4c3e6ea 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp | |||
| @@ -350,6 +350,24 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result, | |||
| 350 | SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); | 350 | SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp)); |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | void Reporter::SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode, | ||
| 354 | std::string log_message) const { | ||
| 355 | if (!IsReportingEnabled()) | ||
| 356 | return; | ||
| 357 | |||
| 358 | const auto timestamp = GetTimestamp(); | ||
| 359 | const auto title_id = system.CurrentProcess()->GetTitleID(); | ||
| 360 | json out; | ||
| 361 | |||
| 362 | out["yuzu_version"] = GetYuzuVersionData(); | ||
| 363 | out["report_common"] = GetReportCommonData(title_id, RESULT_SUCCESS, timestamp); | ||
| 364 | |||
| 365 | out["log_mode"] = fmt::format("{:08X}", static_cast<u32>(log_mode)); | ||
| 366 | out["log_message"] = std::move(log_message); | ||
| 367 | |||
| 368 | SaveToFile(std::move(out), GetPath("filesystem_access_report", title_id, timestamp)); | ||
| 369 | } | ||
| 370 | |||
| 353 | void Reporter::SaveUserReport() const { | 371 | void Reporter::SaveUserReport() const { |
| 354 | if (!IsReportingEnabled()) { | 372 | if (!IsReportingEnabled()) { |
| 355 | return; | 373 | return; |