aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-12-27 20:12:26 +0100
committerMihai Moldovan <ionic@ionic.de>2017-12-27 20:51:00 +0100
commit8036f6914ddb38cd06b27739a84b3a3667413c14 (patch)
tree9d4719d7e858d83e22b9049fb9f9b4f3bb3fc2e2 /nxcomp/src
parent56dbc215666f0c0e5bdf316aab31db9b42b6920d (diff)
downloadnx-libs-8036f6914ddb38cd06b27739a84b3a3667413c14.tar.gz
nx-libs-8036f6914ddb38cd06b27739a84b3a3667413c14.tar.bz2
nx-libs-8036f6914ddb38cd06b27739a84b3a3667413c14.zip
nxcomp/src/Log.cpp: don't confuse users with useless warning messages in case that a log line append operation was requested, but the message level has lower precedence than the current log filter.
Diffstat (limited to 'nxcomp/src')
-rw-r--r--nxcomp/src/Log.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/nxcomp/src/Log.cpp b/nxcomp/src/Log.cpp
index a3a7222ef..4a9a2679d 100644
--- a/nxcomp/src/Log.cpp
+++ b/nxcomp/src/Log.cpp
@@ -123,15 +123,19 @@ NXLog& operator<< (NXLog& out, const NXLogStamp& value)
/* Appending means that the log object's internal level and the message level must match. */
if (out.current_level() == value.level())
{
- /* And the buffer must of course be non-empty. */
- if (out.has_buffer())
+ /* Discard, if the message is not supposed to be written out anyway. */
+ if (out.will_log ())
{
- out << " (cont.) ";
- }
- else
- {
- std::cerr << "WARNING: Append operation requested, but no queued data available. "
- << "Internal state error!\n" << "Log line will be discarded!" << std::endl;
+ /* And the buffer must of course be non-empty. */
+ if (out.has_buffer())
+ {
+ out << " (cont.) ";
+ }
+ else
+ {
+ std::cerr << "WARNING: Append operation requested, but no queued data available. "
+ << "Internal state error!\n" << "Log line will be discarded!" << std::endl;
+ }
}
}
else