JayBeams  0.1
Another project to have fun coding.
severity_level.hpp
Go to the documentation of this file.
1 #ifndef jb_severity_level_hpp
2 #define jb_severity_level_hpp
3 
4 #include <iosfwd>
5 #include <string>
6 
7 namespace jb {
8 
9 /// Severity levels for JayBeams, based on syslog
10 enum class severity_level {
11  trace,
12  debug,
13  info,
14  notice,
15  warning,
16  error,
17  critical,
18  alert,
19  fatal,
20 };
21 
22 /// Streaming for severity levels
23 std::ostream& operator<<(std::ostream& os, severity_level const& x);
24 std::istream& operator>>(std::istream& is, severity_level& x);
25 
26 /// Parse a severity level
27 void parse(severity_level& lhs, std::string const& rhs);
28 
29 /// Get the name of a security level
30 char const* get_name(severity_level const& rhs);
31 
32 /// Return the recommended with for printing security levels
34 
35 } // namespace jb
36 
37 #endif // jb_severity_level_hpp
severity_level
Severity levels for JayBeams, based on syslog.
std::ostream & operator<<(std::ostream &os, as_hhmmssu const &x)
Format as_hhmmssu into an iostream.
Definition: as_hhmmss.cpp:8
char const * get_name(severity_level const &rhs)
Get the name of a security level.
std::istream & operator>>(std::istream &, cpu_set &)
Read a cpu set in list format.
Definition: cpu_set.cpp:104
int severity_level_width()
Return the recommended with for printing security levels.
void parse(severity_level &lhs, std::string const &rhs)
Parse a severity level.
The top-level namespace for the JayBeams library.
Definition: as_hhmmss.hpp:7