Module: check_mk
Branch: master
Commit: 3741a91dd31468d325bcbd76e966e4c2234987e0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3741a91dd31468…
Author: Sergey Kipnis <sk(a)mathias-kettner.de>
Date: Thu May 2 18:38:53 2019 +0200
[CMK-2048] - few log messages has decreased level of severity
Change-Id: I59b74feac99e44c8c4cdd18f9e20a790afcc7944
---
agents/wnx/src/engine/cfg.cpp | 17 ++++++-----------
agents/wnx/src/engine/providers/spool.cpp | 18 +++++++-----------
2 files changed, 13 insertions(+), 22 deletions(-)
diff --git a/agents/wnx/src/engine/cfg.cpp b/agents/wnx/src/engine/cfg.cpp
index 8d4093e..019b4ca 100644
--- a/agents/wnx/src/engine/cfg.cpp
+++ b/agents/wnx/src/engine/cfg.cpp
@@ -2,31 +2,27 @@
#include "stdafx.h"
#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
#include <direct.h> // known path
#include <shellapi.h>
#include <shlobj.h> // known path
+#include <windows.h>
#include <atomic>
#include <filesystem>
#include <string>
+#include "cfg.h"
+#include "cfg_details.h"
#include "common/cfg_info.h"
#include "common/wtools.h"
-
+#include "logger.h"
+#include "read_file.h"
#include "tools/_misc.h" // setenv
#include "tools/_process.h" // GetSomeFolder...
#include "tools/_raii.h" // on out
#include "tools/_tgt.h" // we need IsDebug
-
#include "yaml-cpp/yaml.h"
-#include "cfg.h"
-#include "cfg_details.h"
-#include "logger.h"
-#include "read_file.h"
-
namespace cma {
namespace details {
// internal and hidden variables
@@ -965,8 +961,7 @@ LoadCfgStatus ConfigInfo::loadAggregated(const std::wstring&
ConfigFileName,
// check root
auto& root = yamls[0];
if (!root.exists() || root.data().empty() || root.bad()) {
- XLOG::l.crit("Cannot find/read root cfg '{}'. Installation
damaged.",
- root.path_.u8string());
+ XLOG::d("Cannot find/read root cfg '{}'. ",
root.path_.u8string());
return LoadCfgStatus::kAllFailed;
}
diff --git a/agents/wnx/src/engine/providers/spool.cpp
b/agents/wnx/src/engine/providers/spool.cpp
index 39caa8b..cf07db0 100644
--- a/agents/wnx/src/engine/providers/spool.cpp
+++ b/agents/wnx/src/engine/providers/spool.cpp
@@ -2,6 +2,8 @@
// provides basic api to start and stop service
#include "stdafx.h"
+#include "providers/spool.h"
+
#include <chrono>
#include <filesystem>
#include <regex>
@@ -9,21 +11,15 @@
#include <string_view>
#include <tuple>
-#include "fmt/format.h"
-
-#include "tools/_raii.h"
-#include "tools/_xlog.h"
-
-#include "common/wtools.h"
-
#include "cfg.h"
#include "cma_core.h"
+#include "common/wtools.h"
+#include "fmt/format.h"
#include "glob_match.h"
-
#include "logger.h"
#include "read_file.h"
-
-#include "providers/spool.h"
+#include "tools/_raii.h"
+#include "tools/_xlog.h"
namespace cma::provider {
@@ -103,7 +99,7 @@ std::string SpoolProvider::makeBody() const {
fs::path dir = cma::cfg::GetSpoolDir();
// check presence of the folder
if (!IsDirectoryValid(dir)) {
- XLOG::l("Spool directory absent. But spool is requested");
+ XLOG::d("Spool directory absent. But spool is requested");
return {};
}