You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2024/05/02 14:32:54 UTC
(ofbiz-framework) 02/03: Fixed: Prevents to uselessly clutter the logs up with SetTimeZoneFromBrowser errors (OFBIZ-13061)
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit 486f2727316f659a4a659b97a3d323655f811685
Author: Jacques Le Roux <ja...@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.
Conflicts handled by hand
---
.../main/java/org/apache/ofbiz/webapp/control/RequestHandler.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 1d9bef351a..061f9b7d0b 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
@@ -592,8 +592,10 @@ public class RequestHandler {
// If error, then display more error messages:
if ("error".equals(eventReturnBasedRequestResponse.name)) {
- if (Debug.errorOn()) {
- String errorMessageHeader = "Request " + requestMap.uri + " caused an error with the following message: ";
+ String uri = requestMap.getUri();
+ if (Debug.errorOn()
+ && !uri.equals("SetTimeZoneFromBrowser")) { // Prevents to uselessly clutter the logs up with SetTimeZoneFromBrowser errors
+ String errorMessageHeader = "Request " + uri + " caused an error with the following message: ";
if (request.getAttribute("_ERROR_MESSAGE_") != null) {
Debug.logError(errorMessageHeader + request.getAttribute("_ERROR_MESSAGE_"), module);
}