mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fixed order of debug & trace according to spec
This commit is contained in:
@@ -23,7 +23,7 @@ namespace uuid {
|
|||||||
namespace log {
|
namespace log {
|
||||||
|
|
||||||
char format_level_char(Level level) {
|
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];
|
return log_level_chars[(int)level + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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_warning),
|
||||||
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_notice),
|
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_notice),
|
||||||
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_info),
|
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_debug),
|
||||||
|
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_trace),
|
||||||
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_all)};
|
reinterpret_cast<const __FlashStringHelper *>(pstr_level_lowercase_all)};
|
||||||
|
|
||||||
const __FlashStringHelper * format_level_lowercase(Level level) {
|
const __FlashStringHelper * format_level_lowercase(Level level) {
|
||||||
|
|||||||
@@ -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_warning),
|
||||||
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_notice),
|
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_notice),
|
||||||
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_info),
|
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_debug),
|
||||||
|
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_trace),
|
||||||
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_all)};
|
reinterpret_cast<const __FlashStringHelper *>(pstr_level_uppercase_all)};
|
||||||
|
|
||||||
const __FlashStringHelper * format_level_uppercase(Level level) {
|
const __FlashStringHelper * format_level_uppercase(Level level) {
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ std::vector<Level> levels() {
|
|||||||
Level::WARNING,
|
Level::WARNING,
|
||||||
Level::NOTICE,
|
Level::NOTICE,
|
||||||
Level::INFO,
|
Level::INFO,
|
||||||
|
Level::DEBUG,
|
||||||
Level::TRACE,
|
Level::TRACE,
|
||||||
Level::DEBUG, // switched by proddy
|
|
||||||
Level::ALL};
|
Level::ALL};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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::WARNING)),
|
||||||
uuid::read_flash_string(format_level_lowercase(Level::NOTICE)),
|
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::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::DEBUG)),
|
||||||
|
uuid::read_flash_string(format_level_lowercase(Level::TRACE)),
|
||||||
uuid::read_flash_string(format_level_lowercase(Level::ALL))};
|
uuid::read_flash_string(format_level_lowercase(Level::ALL))};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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::WARNING)),
|
||||||
uuid::read_flash_string(format_level_uppercase(Level::NOTICE)),
|
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::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::DEBUG)),
|
||||||
|
uuid::read_flash_string(format_level_uppercase(Level::TRACE)),
|
||||||
uuid::read_flash_string(format_level_uppercase(Level::ALL))};
|
uuid::read_flash_string(format_level_uppercase(Level::ALL))};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace uuid {
|
|||||||
namespace log {
|
namespace log {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Severity level of log messages. Proddy switches trace & debug
|
* Severity level of log messages.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
@@ -84,8 +84,8 @@ enum Level : int8_t {
|
|||||||
WARNING, /*!< Warning conditions. @since 1.0.0 */
|
WARNING, /*!< Warning conditions. @since 1.0.0 */
|
||||||
NOTICE, /*!< Normal but significant conditions. @since 1.0.0 */
|
NOTICE, /*!< Normal but significant conditions. @since 1.0.0 */
|
||||||
INFO, /*!< Informational messages. @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 */
|
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 */
|
ALL, /*!< Meta level representing all log messages. @since 1.0.0 */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user