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 CXL, 22 }; 23 24 enum class SyslogSeverity{ 25 Invalid, 26 Emergency, 27 Alert, 28 Critical, 29 Error, 30 Warning, 31 Notice, 32 Informational, 33 Debug, 34 All, 35 }; 36 37 enum class SyslogFacility{ 38 Invalid, 39 Kern, 40 User, 41 Mail, 42 Daemon, 43 Auth, 44 Syslog, 45 LPR, 46 News, 47 UUCP, 48 Cron, 49 Authpriv, 50 FTP, 51 NTP, 52 Security, 53 Console, 54 SolarisCron, 55 Local0, 56 Local1, 57 Local2, 58 Local3, 59 Local4, 60 Local5, 61 Local6, 62 Local7, 63 }; 64 65 enum class LogDiagnosticDataTypes{ 66 Invalid, 67 Manager, 68 PreOS, 69 OS, 70 OEM, 71 }; 72 73 enum class LogPurpose{ 74 Invalid, 75 Diagnostic, 76 Operations, 77 Security, 78 Telemetry, 79 ExternalEntity, 80 OEM, 81 }; 82 83 enum class TransferProtocolType{ 84 Invalid, 85 CIFS, 86 FTP, 87 SFTP, 88 HTTP, 89 HTTPS, 90 NFS, 91 SCP, 92 TFTP, 93 OEM, 94 }; 95 96 NLOHMANN_JSON_SERIALIZE_ENUM(OverWritePolicy, { 97 {OverWritePolicy::Invalid, "Invalid"}, 98 {OverWritePolicy::Unknown, "Unknown"}, 99 {OverWritePolicy::WrapsWhenFull, "WrapsWhenFull"}, 100 {OverWritePolicy::NeverOverWrites, "NeverOverWrites"}, 101 }); 102 103 NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryTypes, { 104 {LogEntryTypes::Invalid, "Invalid"}, 105 {LogEntryTypes::Event, "Event"}, 106 {LogEntryTypes::SEL, "SEL"}, 107 {LogEntryTypes::Multiple, "Multiple"}, 108 {LogEntryTypes::OEM, "OEM"}, 109 {LogEntryTypes::CXL, "CXL"}, 110 }); 111 112 NLOHMANN_JSON_SERIALIZE_ENUM(SyslogSeverity, { 113 {SyslogSeverity::Invalid, "Invalid"}, 114 {SyslogSeverity::Emergency, "Emergency"}, 115 {SyslogSeverity::Alert, "Alert"}, 116 {SyslogSeverity::Critical, "Critical"}, 117 {SyslogSeverity::Error, "Error"}, 118 {SyslogSeverity::Warning, "Warning"}, 119 {SyslogSeverity::Notice, "Notice"}, 120 {SyslogSeverity::Informational, "Informational"}, 121 {SyslogSeverity::Debug, "Debug"}, 122 {SyslogSeverity::All, "All"}, 123 }); 124 125 NLOHMANN_JSON_SERIALIZE_ENUM(SyslogFacility, { 126 {SyslogFacility::Invalid, "Invalid"}, 127 {SyslogFacility::Kern, "Kern"}, 128 {SyslogFacility::User, "User"}, 129 {SyslogFacility::Mail, "Mail"}, 130 {SyslogFacility::Daemon, "Daemon"}, 131 {SyslogFacility::Auth, "Auth"}, 132 {SyslogFacility::Syslog, "Syslog"}, 133 {SyslogFacility::LPR, "LPR"}, 134 {SyslogFacility::News, "News"}, 135 {SyslogFacility::UUCP, "UUCP"}, 136 {SyslogFacility::Cron, "Cron"}, 137 {SyslogFacility::Authpriv, "Authpriv"}, 138 {SyslogFacility::FTP, "FTP"}, 139 {SyslogFacility::NTP, "NTP"}, 140 {SyslogFacility::Security, "Security"}, 141 {SyslogFacility::Console, "Console"}, 142 {SyslogFacility::SolarisCron, "SolarisCron"}, 143 {SyslogFacility::Local0, "Local0"}, 144 {SyslogFacility::Local1, "Local1"}, 145 {SyslogFacility::Local2, "Local2"}, 146 {SyslogFacility::Local3, "Local3"}, 147 {SyslogFacility::Local4, "Local4"}, 148 {SyslogFacility::Local5, "Local5"}, 149 {SyslogFacility::Local6, "Local6"}, 150 {SyslogFacility::Local7, "Local7"}, 151 }); 152 153 NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, { 154 {LogDiagnosticDataTypes::Invalid, "Invalid"}, 155 {LogDiagnosticDataTypes::Manager, "Manager"}, 156 {LogDiagnosticDataTypes::PreOS, "PreOS"}, 157 {LogDiagnosticDataTypes::OS, "OS"}, 158 {LogDiagnosticDataTypes::OEM, "OEM"}, 159 }); 160 161 NLOHMANN_JSON_SERIALIZE_ENUM(LogPurpose, { 162 {LogPurpose::Invalid, "Invalid"}, 163 {LogPurpose::Diagnostic, "Diagnostic"}, 164 {LogPurpose::Operations, "Operations"}, 165 {LogPurpose::Security, "Security"}, 166 {LogPurpose::Telemetry, "Telemetry"}, 167 {LogPurpose::ExternalEntity, "ExternalEntity"}, 168 {LogPurpose::OEM, "OEM"}, 169 }); 170 171 NLOHMANN_JSON_SERIALIZE_ENUM(TransferProtocolType, { 172 {TransferProtocolType::Invalid, "Invalid"}, 173 {TransferProtocolType::CIFS, "CIFS"}, 174 {TransferProtocolType::FTP, "FTP"}, 175 {TransferProtocolType::SFTP, "SFTP"}, 176 {TransferProtocolType::HTTP, "HTTP"}, 177 {TransferProtocolType::HTTPS, "HTTPS"}, 178 {TransferProtocolType::NFS, "NFS"}, 179 {TransferProtocolType::SCP, "SCP"}, 180 {TransferProtocolType::TFTP, "TFTP"}, 181 {TransferProtocolType::OEM, "OEM"}, 182 }); 183 184 } 185 // clang-format on 186