[Libreoffice-commits] online.git: common/Log.cpp common/Log.hpp
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 16 09:52:58 UTC 2019
common/Log.cpp | 2 +-
common/Log.hpp | 22 +++++++++++-----------
2 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit 71a942c24b4c4f803a4cf6a968b67b960adce09c
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Sep 16 10:55:26 2019 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Sep 16 11:52:15 2019 +0200
Log: rename isShutdown to isShutdownCalled
Class members that differ only in case are not great.
Change-Id: I2e54bf9b6da7e4e15e03389000a6ff86e98c16a6
diff --git a/common/Log.cpp b/common/Log.cpp
index c94b382a2..0153eff14 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -227,7 +227,7 @@ namespace Log
}
#endif
- bool isShutdown()
+ bool isShutdownCalled()
{
return IsShutdown;
}
diff --git a/common/Log.hpp b/common/Log.hpp
index 6690c01bc..6bf85129e 100644
--- a/common/Log.hpp
+++ b/common/Log.hpp
@@ -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);
@@ -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); \
} \
@@ -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);\
} \
@@ -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); \
} \
@@ -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); \
} \
@@ -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); \
} \
@@ -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); \
} \
@@ -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); \
} \
@@ -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); \
} \
@@ -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); \
} \
More information about the Libreoffice-commits
mailing list