| 25 | // ---------------------------------------------------------------------------------------- |
| 26 | |
| 27 | class log_level |
| 28 | { |
| 29 | public: |
| 30 | log_level( |
| 31 | int priority_, |
| 32 | const char* name_ |
| 33 | ) : |
| 34 | priority(priority_) |
| 35 | { |
| 36 | strncpy(name,name_,19); |
| 37 | name[19] = '\0'; |
| 38 | } |
| 39 | |
| 40 | bool operator< (const log_level& rhs) const { return priority < rhs.priority; } |
| 41 | bool operator<=(const log_level& rhs) const { return priority <= rhs.priority; } |
| 42 | bool operator> (const log_level& rhs) const { return priority > rhs.priority; } |
| 43 | bool operator>=(const log_level& rhs) const { return priority >= rhs.priority; } |
| 44 | |
| 45 | int priority; |
| 46 | char name[20]; |
| 47 | }; |
| 48 | |
| 49 | inline std::ostream& operator<< (std::ostream& out, const log_level& item) |
| 50 | { |
no outgoing calls
no test coverage detected