diff --git a/core/class/class_history.php b/core/class/class_history.php
index 4612a623c7f5ccebb362fea2befe25c7e9cab02b..3404405111090f3994aa74d0de6e460cbdd991ab 100755
--- a/core/class/class_history.php
+++ b/core/class/class_history.php
@@ -418,14 +418,16 @@ class history
         }
 
         if (file_exists(
-            $_SESSION['config']['corepath']. DIRECTORY_SEPARATOR . 'custom'
+            'custom'
             . DIRECTORY_SEPARATOR . $_SESSION['custom_override_id']
             . DIRECTORY_SEPARATOR . "apps"
             . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id']
             . DIRECTORY_SEPARATOR . "xml"
             . DIRECTORY_SEPARATOR . "log4php.xml"
         )) {
-            $configFileLog4PHP = "apps"
+            $configFileLog4PHP = 'custom'
+            . DIRECTORY_SEPARATOR . $_SESSION['custom_override_id']
+            . DIRECTORY_SEPARATOR . "apps"
                 . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id']
                 . DIRECTORY_SEPARATOR . "xml"
                 . DIRECTORY_SEPARATOR . "log4php.xml";