]> granicus.if.org Git - icinga2/commitdiff
Log commands and their arguments.
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 13 Dec 2013 16:37:00 +0000 (17:37 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 13 Dec 2013 16:37:00 +0000 (17:37 +0100)
Fixes #5225

lib/base/process.cpp

index 1df048e38e3ba90569809c095bc28c86dc4f337a..6476dda759c8495d37a98813bb20d68e8c56a5f2 100644 (file)
 #include "base/process.h"
 #include "base/array.h"
 #include "base/objectlock.h"
+#include "base/logger_fwd.h"
 #include <boost/foreach.hpp>
+#include <boost/algorithm/string/join.hpp>
 
 using namespace icinga;
 
 Process::Process(const std::vector<String>& arguments, const Dictionary::Ptr& extraEnvironment)
        : m_Arguments(arguments), m_ExtraEnvironment(extraEnvironment), m_Timeout(600)
-{ }
+{
+       Log(LogDebug, "base", "Running command '" + boost::algorithm::join(arguments, " ") + "'.");
+}
 
 std::vector<String> Process::SplitCommand(const Value& command)
 {