aboutsummaryrefslogtreecommitdiff
path: root/src/core/reporter.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-28 21:02:50 -0400
committerZach Hilman <zachhilman@gmail.com>2019-06-28 21:02:50 -0400
commit554e2f2f983824bee174465c79b9ad3c27e8208f (patch)
tree0ab536c5287b8715928991ccf38c3963b25a564f /src/core/reporter.cpp
parentdb2fdd0352d023787fcac032101e1e36fb8aa03f (diff)
reporter: Add report class for filesystem access logs
Diffstat (limited to 'src/core/reporter.cpp')
-rw-r--r--src/core/reporter.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 7740225696..059467318d 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -335,6 +335,24 @@ void Reporter::SaveErrorReport(u64 title_id, ResultCode result,
SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp));
}
+void Reporter::SaveFilesystemAccessReport(Service::FileSystem::LogMode log_mode,
+ std::string log_message) const {
+ if (!IsReportingEnabled())
+ return;
+
+ const auto timestamp = GetTimestamp();
+ const auto title_id = system.CurrentProcess()->GetTitleID();
+ json out;
+
+ out["yuzu_version"] = GetYuzuVersionData();
+ out["report_common"] = GetReportCommonData(title_id, RESULT_SUCCESS, timestamp);
+
+ out["log_mode"] = fmt::format("{:08X}", static_cast<u32>(log_mode));
+ out["log_message"] = std::move(log_message);
+
+ SaveToFile(std::move(out), GetPath("filesystem_access_report", title_id, timestamp));
+}
+
void Reporter::SaveUserReport() const {
if (!IsReportingEnabled())
return;