Implement RFC3164 formatting for syslog message; Implement UDP writer.

This commit is contained in:
Marko Zivanovic
2015-09-04 12:13:02 +02:00
parent 923765c0f3
commit 2dad24a22e
13 changed files with 258 additions and 6 deletions
+7 -3
View File
@@ -40,6 +40,9 @@ public:
Severity(const Severity& orig) : _value(orig._value) {
};
virtual ~Severity() {
};
bool operator!=(const Severity& right) const {
bool result = !(*this == right); // Reuse equals operator
return result;
@@ -49,14 +52,15 @@ public:
return _value == right._value;
}
virtual ~Severity() {
};
friend std::ostream& operator<<(std::ostream& os, const Severity& obj) {
os << obj._value;
return os;
}
uint8_t as_int() const {
return _value;
}
private:
const std::map<std::string, uint8_t> _values{