Blame SOURCES/0037-Ticket-49075-Adjust-logging-severity-levels.patch

6f51e1
From d3771cf05358c0230c8c77d7f7dabe9219ea7c8c Mon Sep 17 00:00:00 2001
6f51e1
From: Mark Reynolds <mreynolds@redhat.com>
6f51e1
Date: Wed, 3 May 2017 14:37:11 -0400
6f51e1
Subject: [PATCH] Ticket 49075 - Adjust logging severity levels
6f51e1
6f51e1
Description:  There are places wherre we log a severity "ERR",
6f51e1
              when in fact it is a benign message.
6f51e1
6f51e1
https://pagure.io/389-ds-base/issue/49075
6f51e1
6f51e1
Reviewed by: firstyear(Thanks!)
6f51e1
6f51e1
(cherry picked from commit 0762e393850f54ce8462c45321b3db084bd8a0e1)
6f51e1
---
6f51e1
 ldap/servers/slapd/back-ldbm/ldbm_instance_config.c | 17 ++++++++++-------
6f51e1
 1 file changed, 10 insertions(+), 7 deletions(-)
6f51e1
6f51e1
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
6f51e1
index 36d830d..55f1887 100644
6f51e1
--- a/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
6f51e1
+++ b/ldap/servers/slapd/back-ldbm/ldbm_instance_config.c
6f51e1
@@ -118,10 +118,12 @@ ldbm_instance_config_cachememsize_set(void *arg, void *value, char *errorbuf, in
6f51e1
 
6f51e1
             if (sane == UTIL_CACHESIZE_ERROR){
6f51e1
                 slapi_create_errormsg(errorbuf, SLAPI_DSE_RETURNTEXT_SIZE, "Error: unable to determine system memory limits.");
6f51e1
-                slapi_log_err(SLAPI_LOG_ERR, "ldbm_instance_config_cachememsize_set", "Enable to determine system memory limits.\n");
6f51e1
+                slapi_log_err(SLAPI_LOG_ERR, "ldbm_instance_config_cachememsize_set",
6f51e1
+                        "Enable to determine system memory limits.\n");
6f51e1
                 return LDAP_UNWILLING_TO_PERFORM;
6f51e1
             } else if (sane == UTIL_CACHESIZE_REDUCED) {
6f51e1
-                slapi_log_err(SLAPI_LOG_WARNING, "ldbm_instance_config_cachememsize_set", "delta +%"PRIu64" of request %"PRIu64" reduced to %"PRIu64"\n", delta_original, val, delta);
6f51e1
+                slapi_log_err(SLAPI_LOG_WARNING, "ldbm_instance_config_cachememsize_set",
6f51e1
+                        "delta +%"PRIu64" of request %"PRIu64" reduced to %"PRIu64"\n", delta_original, val, delta);
6f51e1
                 /*
6f51e1
                  * This works as: value = 100
6f51e1
                  * delta_original to inst, 20;
6f51e1
@@ -133,7 +135,8 @@ ldbm_instance_config_cachememsize_set(void *arg, void *value, char *errorbuf, in
6f51e1
             }
6f51e1
         }
6f51e1
         if (inst->inst_cache.c_maxsize < MINCACHESIZE || val < MINCACHESIZE) {
6f51e1
-            slapi_log_err(SLAPI_LOG_ERR, "ldbm_instance_config_cachememsize_set", "force a minimal value %"PRIu64"\n", MINCACHESIZE);
6f51e1
+            slapi_log_err(SLAPI_LOG_INFO, "ldbm_instance_config_cachememsize_set",
6f51e1
+                    "force a minimal value %"PRIu64"\n", MINCACHESIZE);
6f51e1
             /* This value will trigger an autotune next start up, but it should increase only */
6f51e1
             val = MINCACHESIZE;
6f51e1
         }
6f51e1
@@ -1134,7 +1137,7 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb, Slapi_Entry*
6f51e1
         return SLAPI_DSE_CALLBACK_ERROR;
6f51e1
     }
6f51e1
 
6f51e1
-    slapi_log_err(SLAPI_LOG_ERR, "ldbm_instance_post_delete_instance_entry_callback",
6f51e1
+    slapi_log_err(SLAPI_LOG_INFO, "ldbm_instance_post_delete_instance_entry_callback",
6f51e1
         "Removing '%s'.\n", instance_name);
6f51e1
 
6f51e1
     cache_destroy_please(&inst->inst_cache, CACHE_TYPE_ENTRY);
6f51e1
@@ -1171,9 +1174,9 @@ ldbm_instance_post_delete_instance_entry_callback(Slapi_PBlock *pb, Slapi_Entry*
6f51e1
                         dbp = PR_smprintf("%s/%s", inst_dirp, direntry->name);
6f51e1
                         if (NULL == dbp) {
6f51e1
                             slapi_log_err(SLAPI_LOG_ERR,
6f51e1
-                            "ldbm_instance_post_delete_instance_entry_callback",
6f51e1
-                            "Failed to generate db path: %s/%s\n",
6f51e1
-                            inst_dirp, direntry->name);
6f51e1
+                                "ldbm_instance_post_delete_instance_entry_callback",
6f51e1
+                                "Failed to generate db path: %s/%s\n",
6f51e1
+                                inst_dirp, direntry->name);
6f51e1
                             break;
6f51e1
                         }
6f51e1
 
6f51e1
-- 
6f51e1
2.9.3
6f51e1