aboutsummaryrefslogtreecommitdiff
path: root/src/logging.h
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2022-05-31 21:49:55 +0200
committerJon Atack <jon@atack.com>2022-08-18 16:32:43 +0200
commitf1379aeca9d3a8c4d3528de4d0af8298cb42fee4 (patch)
tree90c0419cdbfb51f06f15a1a522df68febb3c44b0 /src/logging.h
parenta5d5569535b36d9a2d63827debc9fff32d39a630 (diff)
downloadbitcoin-f1379aeca9d3a8c4d3528de4d0af8298cb42fee4.tar.xz
Simplify BCLog::Level enum class and LogLevelToStr() function
- simplify the BCLog::Level enum class (and future changes to it) by only setting the value of the first enumerator - move the BCLog::Level:None enumerator to the end of the BCLog::Level enum class and LogLevelToStr() member function, as the None enumerator is only used internally, and by being the highest BCLog::Level value it can be used to iterate over the enumerators - replace the unused BCLog::Level:None string "none" with an empty string as the case will never be hit - add documentation
Diffstat (limited to 'src/logging.h')
-rw-r--r--src/logging.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/logging.h b/src/logging.h
index 50869ad89a..f3914958cf 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -68,11 +68,11 @@ namespace BCLog {
ALL = ~(uint32_t)0,
};
enum class Level {
- Debug = 0,
- None = 1,
- Info = 2,
- Warning = 3,
- Error = 4,
+ Debug = 0, // High-volume or detailed logging for development/debugging
+ Info, // Default
+ Warning,
+ Error,
+ None, // Internal use only
};
class Logger