11 #ifndef flatlogs_logPriority_hpp
12 #define flatlogs_logPriority_hpp
14 #include <mx/ioutils/stringUtils.hpp>
132 s.erase(std::remove_if(s.begin(), s.end(), ::isspace), s.end());
144 for(
size_t i=0; i< s.size(); ++i) s[i] = ::toupper(s[i]);
174 if( s[1] ==
'B' && s[2] ==
'G' )
int8_t logPrioT
The type of the log priority code.
std::string priorityString(logPrioT &prio)
Get the string representation of a log priority.
Type definitions for the flatlogs format.
constexpr static logPrioT LOG_DEBUG
Used for debugging.
constexpr static logPrioT LOG_CRITICAL
The process can not continue and will shut down (fatal)
constexpr static logPrioT LOG_ERROR
An error has occured which the software will attempt to correct.
constexpr static logPrioT LOG_INFO
Informational. The info log level is the lowest level recorded during normal operations.
constexpr static logPrioT LOG_DEBUG2
Used for debugging, providing a 2nd level.
constexpr static logPrioT LOG_ALERT
This should only be used if some action is required by operators to keep the system safe.
constexpr static logPrioT LOG_UNKNOWN
Used to denote an unkown log type for internal error handling.
constexpr static logPrioT LOG_EMERGENCY
Normal operations of the entire system should be shut down immediately.
constexpr static logPrioT LOG_WARNING
A condition has occurred which may become an error, but the process continues.
constexpr static logPrioT LOG_DEFAULT
Used to denote "use the default level for this log type".
constexpr static logPrioT LOG_NOTICE
A normal but significant condition.
constexpr static logPrioT LOG_TELEM
A telemetry recording.
logPrioT logLevelFromString(const std::string &str)
Get the log priority from a string, which might have the number or the name.