Skip to content

Commit

Permalink
Rename log level quit to quitting.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed May 15, 2024
1 parent 226a66b commit 907c2b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions include/bitcoin/network/log/levels.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum : uint8_t
wire, // Wire sharking
remote, // Remote behavior
fault, // Fault
quit, // Quitting
quitting, // Quitting
objects, // Objects
verbose // Verbose
};
Expand Down Expand Up @@ -133,10 +133,10 @@ enum : uint8_t
#endif

#if defined(HAVE_LOGQ)
constexpr auto quit_defined = true;
#define LOGQ(message) LOG(quit, message)
constexpr auto quitting_defined = true;
#define LOGQ(message) LOG(quitting, message)
#else
constexpr auto quit_defined = false;
constexpr auto quitting_defined = false;
#define LOGQ(message)
#endif

Expand Down
4 changes: 2 additions & 2 deletions include/bitcoin/network/log/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class BCT_API logger final

/// Stop subscribers/pool with final message/empty posted to subscribers.
void stop(const code& ec, const std::string& message, uint8_t level) NOEXCEPT;
void stop(const std::string& message, uint8_t level=levels::quit) NOEXCEPT;
void stop(uint8_t level=levels::quit) NOEXCEPT;
void stop(const std::string& message, uint8_t level=levels::quitting) NOEXCEPT;
void stop(uint8_t level=levels::quitting) NOEXCEPT;
bool stopped() const NOEXCEPT;

protected:
Expand Down
2 changes: 1 addition & 1 deletion src/p2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ p2p::p2p(const settings& settings, const logger& log) NOEXCEPT
////LOG_LOG("Wire log compiled........: ", wire_defined);
////LOG_LOG("Remote log compiled......: ", remote_defined);
////LOG_LOG("Fault log compiled.......: ", fault_defined);
////LOG_LOG("Quit log compiled........: ", quit_defined);
////LOG_LOG("Quitting log compiled....: ", quitting_defined);
////LOG_LOG("Object log compiled......: ", objects_defined);
////LOG_LOG("Verbose log compiled.....: ", verbose_defined);
}
Expand Down

0 comments on commit 907c2b2

Please sign in to comment.