From 6c1dc2ef00efb52379aa4bb8acf3060c7baca0aa Mon Sep 17 00:00:00 2001
From: Prasad <prasad@vtiger.com>
Date: Thu, 29 Jul 2021 14:36:29 +0530
Subject: [PATCH] Turn on log4php.debug only when required

---
 include/logging.php | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/logging.php b/include/logging.php
index 1eb848c7f..0a4a077bf 100644
--- a/include/logging.php
+++ b/include/logging.php
@@ -22,10 +22,16 @@ require_once('config.php');
 // Performance Optimization: Configure the log folder
 @include_once('config.performance.php');
 global $PERFORMANCE_CONFIG;
+if(isset($PERFORMANCE_CONFIG) && isset($PERFORMANCE_CONFIG['LOG4PHP_DEBUG']) && $PERFORMANCE_CONFIG['LOG4PHP_DEBUG']) {
+        define('LOG4PHP_DIR', 'libraries/log4php.debug');
+} else {
+        define('LOG4PHP_DIR', 'libraries/log4php');
+}
+// END
 
 define('LOG4PHP_DEFAULT_INIT_OVERRIDE', true);
 define('LOG4PHP_DIR', 'libraries/log4php.debug');
 require_once(LOG4PHP_DIR.'/Logger.php');
 Logger::configure('log4php.properties');
 
-?>
\ No newline at end of file
+?>
-- 
GitLab