mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-12 03:28:20 +08:00
[feat] add feedback dialog and diagnostic log export, refs #149
This commit is contained in:
1 parent
6a8e79d4a9
commit
097add9397
14 files changed
+731
-10
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* @Author: DI JUNKUN
|
||||
* @Date: 2026-11-11
|
||||
* Copyright (c) 2026 by DI JUNKUN, All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DIAGNOSTIC_EXPORT_H_
|
||||
#define _DIAGNOSTIC_EXPORT_H_
|
||||
|
||||
#include <ctime>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
namespace crossdesk::feedback {
|
||||
|
||||
enum class ExportError { none, no_logs, read_failed, write_failed, too_large };
|
||||
struct ExportResult {
|
||||
ExportError error = ExportError::none;
|
||||
};
|
||||
|
||||
// Exports byte-for-byte snapshots of the active application and transport
|
||||
// logs, plus basic environment information. No account configuration is read.
|
||||
ExportResult ExportDiagnostics(const std::filesystem::path& application_logs,
|
||||
const std::filesystem::path& transport_logs,
|
||||
const std::filesystem::path& destination,
|
||||
const std::string& version,
|
||||
std::time_t now = std::time(nullptr));
|
||||
std::string DiagnosticFileName();
|
||||
|
||||
} // namespace crossdesk::feedback
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user