You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2021/06/03 06:11:29 UTC

[myfaces-tobago] branch tobago-4.x updated: refactor/perf: optimize logging

This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch tobago-4.x
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/tobago-4.x by this push:
     new 7181024  refactor/perf: optimize logging
7181024 is described below

commit 7181024351c5acd20607f96033fc8d5a849d0786
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Jun 3 08:07:51 2021 +0200

    refactor/perf: optimize logging
    
    (cherry picked from commit 6e97433d599a8a6c94de0243c0a499af4bc599d7)
---
 .../main/java/org/apache/myfaces/tobago/util/ComponentUtils.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
index 807b3c1..167ea57 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/util/ComponentUtils.java
@@ -810,8 +810,10 @@ public final class ComponentUtils {
       component.getAttributes().put(DATA_ATTRIBUTES_KEY, map);
     }
     if (map.containsKey(name)) {
-      LOG.warn("Data attribute '{}' is already set for component '{}' (old value='{}', new value='{}')!",
-          name, component.getClientId(), map.get(name), value);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Data attribute '{}' is already set for component '{}' (old value='{}', new value='{}')!",
+            name, component.getClientId(), map.get(name), value);
+      }
     }
     map.put(name, value);
   }