andykimpe / rpms / 389-ds-base

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

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

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