1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace log_service 5 { 6 // clang-format off 7 8 enum class OverWritePolicy{ 9 Invalid, 10 Unknown, 11 WrapsWhenFull, 12 NeverOverWrites, 13 }; 14 15 enum class LogEntryTypes{ 16 Invalid, 17 Event, 18 SEL, 19 Multiple, 20 OEM, 21 }; 22 23 enum class SyslogSeverity{ 24 Invalid, 25 Emergency, 26 Alert, 27 Critical, 28 Error, 29 Warning, 30 Notice, 31 Informational, 32 Debug, 33 All, 34 }; 35 36 enum class SyslogFacility{ 37 Invalid, 38 Kern, 39 User, 40 Mail, 41 Daemon, 42 Auth, 43 Syslog, 44 LPR, 45 News, 46 UUCP, 47 Cron, 48 Authpriv, 49 FTP, 50 NTP, 51 Security, 52 Console, 53 SolarisCron, 54 Local0, 55 Local1, 56 Local2, 57 Local3, 58 Local4, 59 Local5, 60 Local6, 61 Local7, 62 }; 63 64 enum class LogDiagnosticDataTypes{ 65 Invalid, 66 Manager, 67 PreOS, 68 OS, 69 OEM, 70 }; 71 72 NLOHMANN_JSON_SERIALIZE_ENUM(OverWritePolicy, { 73 {OverWritePolicy::Invalid, "Invalid"}, 74 {OverWritePolicy::Unknown, "Unknown"}, 75 {OverWritePolicy::WrapsWhenFull, "WrapsWhenFull"}, 76 {OverWritePolicy::NeverOverWrites, "NeverOverWrites"}, 77 }); 78 79 NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryTypes, { 80 {LogEntryTypes::Invalid, "Invalid"}, 81 {LogEntryTypes::Event, "Event"}, 82 {LogEntryTypes::SEL, "SEL"}, 83 {LogEntryTypes::Multiple, "Multiple"}, 84 {LogEntryTypes::OEM, "OEM"}, 85 }); 86 87 NLOHMANN_JSON_SERIALIZE_ENUM(SyslogSeverity, { 88 {SyslogSeverity::Invalid, "Invalid"}, 89 {SyslogSeverity::Emergency, "Emergency"}, 90 {SyslogSeverity::Alert, "Alert"}, 91 {SyslogSeverity::Critical, "Critical"}, 92 {SyslogSeverity::Error, "Error"}, 93 {SyslogSeverity::Warning, "Warning"}, 94 {SyslogSeverity::Notice, "Notice"}, 95 {SyslogSeverity::Informational, "Informational"}, 96 {SyslogSeverity::Debug, "Debug"}, 97 {SyslogSeverity::All, "All"}, 98 }); 99 100 NLOHMANN_JSON_SERIALIZE_ENUM(SyslogFacility, { 101 {SyslogFacility::Invalid, "Invalid"}, 102 {SyslogFacility::Kern, "Kern"}, 103 {SyslogFacility::User, "User"}, 104 {SyslogFacility::Mail, "Mail"}, 105 {SyslogFacility::Daemon, "Daemon"}, 106 {SyslogFacility::Auth, "Auth"}, 107 {SyslogFacility::Syslog, "Syslog"}, 108 {SyslogFacility::LPR, "LPR"}, 109 {SyslogFacility::News, "News"}, 110 {SyslogFacility::UUCP, "UUCP"}, 111 {SyslogFacility::Cron, "Cron"}, 112 {SyslogFacility::Authpriv, "Authpriv"}, 113 {SyslogFacility::FTP, "FTP"}, 114 {SyslogFacility::NTP, "NTP"}, 115 {SyslogFacility::Security, "Security"}, 116 {SyslogFacility::Console, "Console"}, 117 {SyslogFacility::SolarisCron, "SolarisCron"}, 118 {SyslogFacility::Local0, "Local0"}, 119 {SyslogFacility::Local1, "Local1"}, 120 {SyslogFacility::Local2, "Local2"}, 121 {SyslogFacility::Local3, "Local3"}, 122 {SyslogFacility::Local4, "Local4"}, 123 {SyslogFacility::Local5, "Local5"}, 124 {SyslogFacility::Local6, "Local6"}, 125 {SyslogFacility::Local7, "Local7"}, 126 }); 127 128 NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, { 129 {LogDiagnosticDataTypes::Invalid, "Invalid"}, 130 {LogDiagnosticDataTypes::Manager, "Manager"}, 131 {LogDiagnosticDataTypes::PreOS, "PreOS"}, 132 {LogDiagnosticDataTypes::OS, "OS"}, 133 {LogDiagnosticDataTypes::OEM, "OEM"}, 134 }); 135 136 } 137 // clang-format on 138