andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 6 months ago
Clone

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

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