fixed order of debug & trace according to spec

This commit is contained in:
proddy
2020-06-13 15:46:49 +02:00
parent ee29a39140
commit 20ce017686
7 changed files with 8 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ namespace uuid {
namespace log {
char format_level_char(Level level) {
constexpr char log_level_chars[(int)Level::ALL - (int)Level::OFF + 1] = {' ', 'P', 'A', 'C', 'E', 'W', 'N', 'I', 'T', 'D', ' '}; // changed by proddy
constexpr char log_level_chars[(int)Level::ALL - (int)Level::OFF + 1] = {' ', 'P', 'A', 'C', 'E', 'W', 'N', 'I', 'D', 'T', ' '};
return log_level_chars[(int)level + 1];
}

View File

@@ -47,8 +47,8 @@ PROGMEM = {reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_of
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_warning),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_notice),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_info),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_trace), // switched by proddy
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_debug),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_trace),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_all)};
const __FlashStringHelper * format_level_lowercase(Level level) {

View File

@@ -47,8 +47,8 @@ PROGMEM = {reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_of
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_warning),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_notice),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_info),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_trace), // switched by proddy
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_debug),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_trace),
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_all)};
const __FlashStringHelper * format_level_uppercase(Level level) {

View File

@@ -33,8 +33,8 @@ std::vector<Level> levels() {
Level::WARNING,
Level::NOTICE,
Level::INFO,
Level::DEBUG,
Level::TRACE,
Level::DEBUG, // switched by proddy
Level::ALL};
}

View File

@@ -35,8 +35,8 @@ std::vector<std::string> levels_lowercase() {
uuid::read_flash_string(format_level_lowercase(Level::WARNING)),
uuid::read_flash_string(format_level_lowercase(Level::NOTICE)),
uuid::read_flash_string(format_level_lowercase(Level::INFO)),
uuid::read_flash_string(format_level_lowercase(Level::TRACE)), // switched by proddy
uuid::read_flash_string(format_level_lowercase(Level::DEBUG)),
uuid::read_flash_string(format_level_lowercase(Level::TRACE)),
uuid::read_flash_string(format_level_lowercase(Level::ALL))};
}

View File

@@ -35,8 +35,8 @@ std::vector<std::string> levels_uppercase() {
uuid::read_flash_string(format_level_uppercase(Level::WARNING)),
uuid::read_flash_string(format_level_uppercase(Level::NOTICE)),
uuid::read_flash_string(format_level_uppercase(Level::INFO)),
uuid::read_flash_string(format_level_uppercase(Level::TRACE)), // switched by proddy
uuid::read_flash_string(format_level_uppercase(Level::DEBUG)),
uuid::read_flash_string(format_level_uppercase(Level::TRACE)),
uuid::read_flash_string(format_level_uppercase(Level::ALL))};
}

View File

@@ -71,7 +71,7 @@ namespace uuid {
namespace log {
/**
* Severity level of log messages. Proddy switches trace & debug
* Severity level of log messages.
*
* @since 1.0.0
*/
@@ -84,8 +84,8 @@ enum Level : int8_t {
WARNING, /*!< Warning conditions. @since 1.0.0 */
NOTICE, /*!< Normal but significant conditions. @since 1.0.0 */
INFO, /*!< Informational messages. @since 1.0.0 */
TRACE, /*!< Trace messages. @since 1.0.0 */
DEBUG, /*!< Debug-level messages. @since 1.0.0 */
TRACE, /*!< Trace messages. @since 1.0.0 */
ALL, /*!< Meta level representing all log messages. @since 1.0.0 */
};