mirror of
https://github.com/mudita/MuditaOS.git
synced 2025-12-24 06:28:29 -05:00
Added info about product, OS version, commit hash and serial number to log filename to simplify triage and quick sanity check of the logs in cases many log files have to be analyzed.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
namespace Store
|
|
{
|
|
struct CrashdumpMetadata
|
|
{
|
|
public:
|
|
CrashdumpMetadata(const CrashdumpMetadata &) = delete;
|
|
CrashdumpMetadata &operator=(const CrashdumpMetadata &) = delete;
|
|
|
|
[[nodiscard]] static CrashdumpMetadata &getInstance();
|
|
|
|
void setSerialNumber(const std::string &serialNumber);
|
|
[[nodiscard]] const std::string &getSerialNumber();
|
|
|
|
void setProductName(const std::string &product);
|
|
[[nodiscard]] const std::string &getProductName();
|
|
|
|
void setOsVersion(const std::string &osVersion);
|
|
[[nodiscard]] const std::string &getOsVersion();
|
|
|
|
void setCommitHash(const std::string &hash);
|
|
[[nodiscard]] const std::string &getCommitHash();
|
|
|
|
[[nodiscard]] std::string getMetadataString();
|
|
|
|
private:
|
|
CrashdumpMetadata();
|
|
|
|
std::string serialNumber;
|
|
std::string productName;
|
|
std::string osVersion;
|
|
std::string commitHash;
|
|
};
|
|
} // namespace Store
|