src/examples/elasticsearch/main.cpp
//! Attribute mapping from its real values to human-readable string representation.
Attribute mapping from its real values to human-readable string representation.
Attribute mapping from its real values to human - readable string representation .
void map_severity(blackhole::aux::attachable_ostringstream& stream, level lvl) {
    static std::string LEVEL[] = {
        "DEBUG",
        "INFO",
        "WARNING",
        "ERROR"
    };
    auto value = static_cast<aux::underlying_type<level>::type>(lvl);
    if (value >= 0 && value < sizeof(LEVEL) / sizeof(LEVEL[0])) {
        stream << LEVEL[value];
    } else {
        stream << "UNKNOWN";
    }
}
void map_severity ( blackhole :: aux :: attachable_ostringstream & stream , level lvl ) { static std :: string LEVEL [ ] = { " " , " " , " " , " " } ; auto value = static_cast < aux :: underlying_type < level > :: type > ( lvl ) ; if ( value >= 0 && value < sizeof ( LEVEL ) / sizeof ( LEVEL [ 0 ] ) ) { stream << LEVEL [ value ] ; } else { stream << " " ; } }
Attribute mapping from its real values to human-readable string representation.
Attribute mapping from its real values to human - readable string representation .