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