diff --git a/nano/core_test/enums.cpp b/nano/core_test/enums.cpp index ae60532ed2..a6dc3c8a77 100644 --- a/nano/core_test/enums.cpp +++ b/nano/core_test/enums.cpp @@ -20,4 +20,22 @@ TEST (enums, stat_dir) { ASSERT_FALSE (nano::to_string (static_cast (0)).empty ()); ASSERT_FALSE (nano::to_string (nano::stat::dir::_last).empty ()); +} + +TEST (enums, log_type) +{ + ASSERT_FALSE (nano::log::to_string (static_cast (0)).empty ()); + ASSERT_FALSE (nano::log::to_string (nano::log::type::_last).empty ()); +} + +TEST (enums, log_detail) +{ + ASSERT_FALSE (nano::log::to_string (static_cast (0)).empty ()); + ASSERT_FALSE (nano::log::to_string (nano::log::detail::_last).empty ()); +} + +TEST (enums, log_category) +{ + ASSERT_FALSE (nano::log::to_string (static_cast (0)).empty ()); + ASSERT_FALSE (nano::log::to_string (nano::log::type::_last).empty ()); } \ No newline at end of file diff --git a/nano/lib/logging_enums.hpp b/nano/lib/logging_enums.hpp index 9effd61474..af2ebfda84 100644 --- a/nano/lib/logging_enums.hpp +++ b/nano/lib/logging_enums.hpp @@ -76,6 +76,8 @@ enum class type bootstrap, bootstrap_lazy, bootstrap_legacy, + + _last // Must be the last enum }; enum class detail @@ -112,6 +114,7 @@ enum class detail requesting_account_or_head, requesting_pending, + _last // Must be the last enum }; // TODO: Additionally categorize logs by categories which can be enabled/disabled independently @@ -121,6 +124,8 @@ enum class category work_generation, // ... + + _last // Must be the last enum }; }