]> granicus.if.org Git - icinga2/commitdiff
Rephrase some log messages
authorJean Flach <jean-marcel.flach@netways.de>
Tue, 9 Feb 2016 14:53:40 +0000 (15:53 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 09:46:19 +0000 (10:46 +0100)
refs #11122

lib/base/configobject.cpp
lib/cli/apisetuputility.cpp
lib/cli/nodesetupcommand.cpp
lib/cli/nodeupdateconfigcommand.cpp
lib/cli/pkiutility.cpp
lib/cli/repositoryutility.cpp
lib/remote/apilistener-configsync.cpp
lib/remote/configpackageutility.cpp

index b87c07883df088632799b0656ebdd75362f356f5..20426a603ec7b879cb4f04d88fe7ab0e1d5352c7 100644 (file)
@@ -258,7 +258,7 @@ void ConfigObject::RestoreAttribute(const String& attr, bool updateVersion)
                Value current = newValue;
 
                if (current.IsEmpty())
-                       BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existing object attribute"));
+                       BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existent object attribute"));
 
                String prefix = tokens[0];
 
@@ -272,7 +272,7 @@ void ConfigObject::RestoreAttribute(const String& attr, bool updateVersion)
                        prefix += "." + key;
 
                        if (!dict->Contains(key))
-                               BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existing object attribute"));
+                               BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot restore non-existent object attribute"));
 
                        current = dict->Get(key);
                }
index e576f75dc4555771a70fa0143a4774afb2d81680..55ef0aa504dc923293823dba9830a1741761e698 100644 (file)
@@ -85,7 +85,7 @@ bool ApiSetupUtility::SetupMasterCertificates(const String& cn)
 
        if (Utility::PathExists(key)) {
                Log(LogInformation, "cli")
-                   << "Private key file '" << key << "' already existing, skipping.";
+                   << "Private key file '" << key << "' already exists, not generating new certificate.";
                return true;
        }
 
@@ -161,7 +161,7 @@ bool ApiSetupUtility::SetupMasterApiUser(void)
 
        if (Utility::PathExists(apiuserspath)) {
                Log(LogInformation, "cli")
-                   << "API user config file '" << apiuserspath << "' already existing, skipping.";
+                   << "API user config file '" << apiuserspath << "' already exists, not creating config file.";
                return true;
        }
 
index dbbec0b50ea0db582fbb5d293a6e7ee5012b39cb..2428f557a64c751ff71cda23e49fba28031f929a 100644 (file)
@@ -138,7 +138,7 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v
 
        if (Utility::PathExists(existing_path)) {
                Log(LogWarning, "cli")
-                   << "Certificate '" << existing_path << "' for CN '" << cn << "' already existing. Skipping certificate generation.";
+                   << "Certificate '" << existing_path << "' for CN '" << cn << "' already exists. Not generating new certificate.";
        } else {
                Log(LogInformation, "cli")
                    << "Certificates not yet generated. Running 'api setup' now.";
index 18f20f79bdbaf16401c78265e79db955374f8fd4..8714f3b9b750dff1126fdc330244178e482db11a 100644 (file)
@@ -256,7 +256,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
                                BOOST_FOREACH(const String& object_path, object_paths) {
                                        if (object_path.Contains(host_pattern)) {
                                                Log(LogNotice, "cli")
-                                                   << "Host '" << host << "' already existing. Skipping its creation.";
+                                                   << "Host '" << host << "' already exists.";
                                                skip_host = true;
                                                break;
                                        }
@@ -272,7 +272,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
                                if (NodeUtility::CheckAgainstBlackAndWhiteList("blacklist", node_name, host, Empty) &&
                                    !NodeUtility::CheckAgainstBlackAndWhiteList("whitelist", node_name, host, Empty)) {
                                        Log(LogWarning, "cli")
-                                           << "Host '" << host << "' on node '" << node_name << "' is blacklisted, but not whitelisted. Skipping.";
+                                           << "Host '" << host << "' on node '" << node_name << "' is blacklisted, but not whitelisted. Not creating host object.";
                                        skip_host = true;
                                        host_was_blacklisted = true; //check this for services on this blacklisted host
                                }
@@ -321,7 +321,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
                                        BOOST_FOREACH(const String& object_path, object_paths) {
                                                if (object_path.Contains(service_pattern)) {
                                                        Log(LogNotice, "cli")
-                                                           << "Service '" << service << "' on Host '" << host << "' already existing. Skipping its creation.";
+                                                           << "Service '" << service << "' on Host '" << host << "' already exists.";
                                                        skip_service = true;
                                                        break;
                                                }
@@ -332,7 +332,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
                                            !NodeUtility::CheckAgainstBlackAndWhiteList("whitelist", endpoint, host, service)) {
                                                Log(LogWarning, "cli")
                                                    << "Service '" << service << "' on host '" << host << "' on node '"
-                                                   << node_name << "' is blacklisted, but not whitelisted. Skipping.";
+                                                   << node_name << "' is blacklisted, but not whitelisted. Not creating service object.";
                                                skip_service = true;
                                        }
 
index 3fc38c9e690f1d6bbc2ae909b3f76719655c1b4e..e80455b764bfd982f7ce4e347d22d219f1b19116 100644 (file)
@@ -53,7 +53,7 @@ int PkiUtility::NewCa(void)
 
        if (Utility::PathExists(caCertFile) && Utility::PathExists(caKeyFile)) {
                Log(LogCritical, "cli")
-                   << "CA files '" << caCertFile << "' and '" << caKeyFile << "'already exist.";
+                   << "CA files '" << caCertFile << "' and '" << caKeyFile << "' already exist.";
                return 1;
        }
 
index 9dba28caaff4c825c1a84d2d553f76a44ffea42b..6fbd6252b80d3a19eb60a5c72135b60d69770dcf 100644 (file)
@@ -611,18 +611,15 @@ void RepositoryUtility::CommitChange(const Dictionary::Ptr& change, const String
        String command = change->Get("command");
        Dictionary::Ptr attrs;
 
-       if (change->Contains("attrs")) {
+       if (change->Contains("attrs"))
                attrs = change->Get("attrs");
-       }
 
        bool success = false;
 
-       if (command == "add") {
+       if (command == "add")
                success = AddObjectInternal(name, type, attrs);
-       }
-       else if (command == "remove") {
+       else if (command == "remove")
                success = RemoveObjectInternal(name, type, attrs);
-       }
 
        if (success) {
                Log(LogNotice, "cli")
index 31eed6d6c20954f16b5a9f07bef40f57ca1a4c63..189f705990091557aaa60c41bc53ad504f8b0b19 100644 (file)
@@ -242,7 +242,7 @@ Value ApiListener::ConfigDeleteObjectAPIHandler(const MessageOrigin::Ptr& origin
 
        if (!object) {
                Log(LogNotice, "ApiListener")
-                   << "Could not delete non-existing object '" << params->Get("name") << "'.";
+                   << "Could not delete non-existent object '" << params->Get("name") << "'.";
                return Empty;
        }
 
index f0f741649c00edd82359a3d5d41b9439153828a1..465c500ba6f2304c07f9906c899d5a4b6a53530f 100644 (file)
@@ -107,7 +107,7 @@ String ConfigPackageUtility::CreateStage(const String& packageName, const Dictio
                        Log(LogInformation, "ConfigPackageUtility")
                            << "Updating configuration file: " << filePath;
 
-                       //pass the directory and generate a dir tree, if not existing already
+                       // Pass the directory and generate a dir tree, if it does not already exist
                        Utility::MkDirP(Utility::DirName(filePath), 0750);
                        std::ofstream fp(filePath.CStr(), std::ofstream::out | std::ostream::binary | std::ostream::trunc);
                        fp << kv.second;