Skip to content

Commit

Permalink
Log: rename isShutdown to isShutdownCalled
Browse files Browse the repository at this point in the history
Class members that differ only in case are not great.

Change-Id: I2e54bf9b6da7e4e15e03389000a6ff86e98c16a6
  • Loading branch information
vmiklos committed Sep 16, 2019
1 parent 7f98a61 commit 71a942c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion common/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ namespace Log
}
#endif

bool isShutdown()
bool isShutdownCalled()
{
return IsShutdown;
}
Expand Down
22 changes: 11 additions & 11 deletions common/Log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ namespace Log
#if !MOBILEAPP
/// Shutdown and release the logging system.
void shutdown();
/// Was shutdown() called?
bool isShutdown();
/// Was static shutdown() called? If so, producing more logs should be avoided.
bool isShutdownCalled();
#endif

char* prefix(char* buffer, std::size_t len, const char* level);
Expand Down Expand Up @@ -291,7 +291,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.trace()) \
if (!Log::isShutdownCalled() && log_.trace()) \
{ \
LOG_BODY_(log_, TRACE, "TRC", X, true); \
} \
Expand All @@ -301,7 +301,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.trace()) \
if (!Log::isShutdownCalled() && log_.trace()) \
{ \
LOG_BODY_(log_, TRACE, "TRC", X, false);\
} \
Expand All @@ -311,7 +311,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.debug()) \
if (!Log::isShutdownCalled() && log_.debug()) \
{ \
LOG_BODY_(log_, DEBUG, "DBG", X, true); \
} \
Expand All @@ -321,7 +321,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.information()) \
if (!Log::isShutdownCalled() && log_.information()) \
{ \
LOG_BODY_(log_, INFORMATION, "INF", X, true); \
} \
Expand All @@ -331,7 +331,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.warning()) \
if (!Log::isShutdownCalled() && log_.warning()) \
{ \
LOG_BODY_(log_, WARNING, "WRN", X, true); \
} \
Expand All @@ -341,7 +341,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.error()) \
if (!Log::isShutdownCalled() && log_.error()) \
{ \
LOG_BODY_(log_, ERROR, "ERR", X, true); \
} \
Expand All @@ -351,7 +351,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.error()) \
if (!Log::isShutdownCalled() && log_.error()) \
{ \
LOG_BODY_(log_, ERROR, "ERR", X << " (" << Util::symbolicErrno(errno) << ": " << std::strerror(errno) << ")", true); \
} \
Expand All @@ -362,7 +362,7 @@ namespace Log
{ \
std::cerr << X << std::endl; \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.fatal()) \
if (!Log::isShutdownCalled() && log_.fatal()) \
{ \
LOG_BODY_(log_, FATAL, "FTL", X, true); \
} \
Expand All @@ -372,7 +372,7 @@ namespace Log
do \
{ \
auto &log_ = Log::logger(); \
if (!Log::isShutdown() && log_.error()) \
if (!Log::isShutdownCalled() && log_.error()) \
{ \
LOG_BODY_(log_, FATAL, "FTL", X << " (" << Util::symbolicErrno(errno) << ": " << std::strerror(errno) << ")", true); \
} \
Expand Down

0 comments on commit 71a942c

Please sign in to comment.