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

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new b12f2779e6 Fixed: Prevents to uselessly clutter the logs up with 
SetTimeZoneFromBrowser errors (OFBIZ-13061)
b12f2779e6 is described below

commit b12f2779e6fd90662baad3fee0f51dfb11215ee8
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Tue Apr 23 18:14:42 2024 +0200

    Fixed: Prevents to uselessly clutter the logs up with 
SetTimeZoneFromBrowser errors (OFBIZ-13061)
    
    The previous commit was not enough as I feared. It still shows in trunk demo
    error.log today. So here comes the ugly but sure fix.
---
 .../src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index 8c9f715183..1e6f110c2b 100644
--- 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@ -726,7 +726,9 @@ public final class RequestHandler {
 
             // If error, then display more error messages:
             if ("error".equals(eventReturnBasedRequestResponse.getName())) {
-                if (Debug.errorOn()) {
+                String uri = requestMap.getUri();
+                if (Debug.errorOn()
+                        && !uri.equals("SetTimeZoneFromBrowser")) { // 
Prevents to uselessly clutter the logs up with SetTimeZoneFromBrowser errors
                     String errorMessageHeader = "Request " + 
requestMap.getUri() + " caused an error with the following message: ";
                     if (request.getAttribute("_ERROR_MESSAGE_") != null) {
                         Debug.logError(errorMessageHeader + 
request.getAttribute("_ERROR_MESSAGE_"), MODULE);

Reply via email to