Module: check_mk
Branch: master
Commit: 8f2070a2c109deb6ae0f7e5eba1cfcc1b44ad7de
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f2070a2c109de…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon May 15 10:28:28 2017 +0200
Always log Livestatus errors.
Change-Id: I9d39353a909db6e029a80873afe63057601e6fe5
---
livestatus/src/OutputBuffer.cc | 1 +
livestatus/src/Query.cc | 5 +----
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/OutputBuffer.cc b/livestatus/src/OutputBuffer.cc
index 474c4ba..16aa419 100644
--- a/livestatus/src/OutputBuffer.cc
+++ b/livestatus/src/OutputBuffer.cc
@@ -100,6 +100,7 @@ void OutputBuffer::writeData(ostringstream &os) {
}
void OutputBuffer::setError(ResponseCode code, const string &message) {
+ Warning(_logger) << "error: " << message;
// only the first error is being returned
if (_error_message == "") {
Informational(_logger) << "error: " << message;
diff --git a/livestatus/src/Query.cc b/livestatus/src/Query.cc
index b29291a..98197d4 100644
--- a/livestatus/src/Query.cc
+++ b/livestatus/src/Query.cc
@@ -659,8 +659,7 @@ void Query::parseLocaltimeLine(char *line) {
}
if (full >= 48 || full <= -48) {
invalidHeader(
- "Invalid Localtime header: timezone difference "
- "greater then 24 hours");
+ "Invalid Localtime header: timezone difference greater then 24
hours");
return;
}
_timezone_offset = full * 1800;
@@ -711,8 +710,6 @@ void Query::start(QueryRenderer &q) {
bool Query::timelimitReached() {
if (_time_limit >= 0 && time(nullptr) >= _time_limit_timeout) {
- Informational(_logger)
- << "Maximum query time of " << _time_limit <<
" seconds exceeded!";
_output.setError(OutputBuffer::ResponseCode::limit_exceeded,
"Maximum query time of " + to_string(_time_limit) +
" seconds exceeded!");