1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace log_entry 5 { 6 // clang-format off 7 8 enum class EventSeverity{ 9 Invalid, 10 OK, 11 Warning, 12 Critical, 13 }; 14 15 enum class LogEntryType{ 16 Invalid, 17 Event, 18 SEL, 19 Oem, 20 }; 21 22 enum class LogDiagnosticDataTypes{ 23 Invalid, 24 Manager, 25 PreOS, 26 OS, 27 OEM, 28 CPER, 29 CPERSection, 30 }; 31 32 enum class OriginatorTypes{ 33 Invalid, 34 Client, 35 Internal, 36 SupportingService, 37 }; 38 39 NLOHMANN_JSON_SERIALIZE_ENUM(EventSeverity, { 40 {EventSeverity::Invalid, "Invalid"}, 41 {EventSeverity::OK, "OK"}, 42 {EventSeverity::Warning, "Warning"}, 43 {EventSeverity::Critical, "Critical"}, 44 }); 45 46 NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryType, { 47 {LogEntryType::Invalid, "Invalid"}, 48 {LogEntryType::Event, "Event"}, 49 {LogEntryType::SEL, "SEL"}, 50 {LogEntryType::Oem, "Oem"}, 51 }); 52 53 NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, { 54 {LogDiagnosticDataTypes::Invalid, "Invalid"}, 55 {LogDiagnosticDataTypes::Manager, "Manager"}, 56 {LogDiagnosticDataTypes::PreOS, "PreOS"}, 57 {LogDiagnosticDataTypes::OS, "OS"}, 58 {LogDiagnosticDataTypes::OEM, "OEM"}, 59 {LogDiagnosticDataTypes::CPER, "CPER"}, 60 {LogDiagnosticDataTypes::CPERSection, "CPERSection"}, 61 }); 62 63 NLOHMANN_JSON_SERIALIZE_ENUM(OriginatorTypes, { 64 {OriginatorTypes::Invalid, "Invalid"}, 65 {OriginatorTypes::Client, "Client"}, 66 {OriginatorTypes::Internal, "Internal"}, 67 {OriginatorTypes::SupportingService, "SupportingService"}, 68 }); 69 70 } 71 // clang-format on 72