Index: /changelog
===================================================================
--- /changelog	(revision 7977)
+++ /changelog	(revision 7978)
@@ -502,3 +502,3 @@
 - Feature: Staffelpreise kÃ¶nnen jetzt angewendet werden wenn im Backend ein Produkt hinzugefÃŒgt wird #776
 - Feature: Abo Modul: Spalten im Backend lassen sich sortieren
-
+- Feature: Fehlerprotokoll kann aktiviert werden
Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 7977)
+++ /controller/wpsg_AdminController.class.php	(revision 7978)
@@ -2189,4 +2189,5 @@
 				$this->update_option('wpsg_options_nl2br', $_REQUEST['wpsg_options_nl2br'], false, false, WPSG_SANITIZE_CHECKBOX);
 				$this->update_option('wpsg_debugModus', $_REQUEST['wpsg_debugModus'], false, false, WPSG_SANITIZE_CHECKBOX);
+				$this->update_option('wpsg_debugLog', $_REQUEST['wpsg_debugLog'], false, false, WPSG_SANITIZE_CHECKBOX);
 				$this->update_option('wpsg_displayTemplates', $_REQUEST['wpsg_displayTemplates'], false, false, WPSG_SANITIZE_CHECKBOX);
 				$this->update_option('wpsg_displayTemplatesLog', $_REQUEST['wpsg_displayTemplatesLog'], false, false, WPSG_SANITIZE_CHECKBOX);
Index: /lib/wpsg_exceptionhandler.class.php
===================================================================
--- /lib/wpsg_exceptionhandler.class.php	(revision 7977)
+++ /lib/wpsg_exceptionhandler.class.php	(revision 7978)
@@ -16,14 +16,11 @@
          */
         static function exception($ex, $break = true) {
-
-            if (get_class($ex) === "wpsg\Exception")
-            {
+			 			
+            if (get_class($ex) === "wpsg\Exception") {
 
                 $typeLabel = $ex->getTypLabel();
                 $arData = $ex->getData();
 
-            }
-            else 
-            {
+            } else {
 
                 $typeLabel = __('Allgemeiner Fehler', 'wpsg');
@@ -34,30 +31,34 @@
             $msg = $ex->getMessage();
 
-            // Protokolleintrag anlegen
-            $strLogText  = date('d.m.Y H:i:s').': '.str_pad($typeLabel, 50, ' ')."\r\n";
-            $strLogText .= $msg."\r\n";
+			if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugLog') === '1') {
+				
+	            // Protokolleintrag anlegen
+	            $strLogText  = date('d.m.Y H:i:s').': '.str_pad($typeLabel, 50, ' ')."\r\n";
+	            $strLogText .= $msg."\r\n";
+	
+	            foreach ($arData as $d)
+	            {
+	
+	                $strLogText .= $d[0].': '.$d[1]."\r\n";
+	
+	            }
+	
+	            ob_start();
+	            $strLogText .= $ex;
+	            ob_end_clean();
+	
+	            ob_start();
+	            debug_print_backtrace();
+	            $backtrace = ob_get_contents();
+	            ob_end_clean();
+	         
+	            $strLogText .= str_pad('', 120, '-')."\r\n";
+	
+	            $log_file = $GLOBALS['wpsg_sc']->getStorageRoot().'exception.log';
+	
+	            if (file_exists($log_file)) file_put_contents($log_file, $strLogText.file_get_contents($log_file));
+	            else file_put_contents($log_file, $strLogText);
 
-            foreach ($arData as $d)
-            {
-
-                $strLogText .= $d[0].': '.$d[1]."\r\n";
-
-            }
-
-            ob_start();
-            $strLogText .= $ex;
-            ob_end_clean();
-
-            ob_start();
-            debug_print_backtrace();
-            $backtrace = ob_get_contents();
-            ob_end_clean();
-         
-            $strLogText .= str_pad('', 120, '-')."\r\n";
-
-            $log_file = $GLOBALS['wpsg_sc']->getStorageRoot().'exception.log';
-
-            if (file_exists($log_file)) file_put_contents($log_file, $strLogText.file_get_contents($log_file));
-            else file_put_contents($log_file, $strLogText);
+			}
 
             if ($break) die(wpsg_debug($typeLabel.": ".$msg."\r\n".$backtrace, true));
@@ -65,4 +66,4 @@
         } // static function myCallbackMethod($ex)
         
-    } // abstract class exceptionhandler
+    }  
     
Index: /views/admin/extended.phtml
===================================================================
--- /views/admin/extended.phtml	(revision 7977)
+++ /views/admin/extended.phtml	(revision 7978)
@@ -32,4 +32,5 @@
 				<br /> 
 				<?php echo wpsg_drawForm_Checkbox('wpsg_debugModus', __('Debug Modus', 'wpsg'), $this->get_option('wpsg_debugModus'), array('help' => 'wpsg_debugModus')); ?>
+				<?php echo wpsg_drawForm_Checkbox('wpsg_debugLog', __('Fehler Protokoll aktivieren', 'wpsg'), $this->get_option('wpsg_debugLog'), array('help' => 'wpsg_debugLog')); ?>
 				<?php echo wpsg_drawForm_Checkbox('wpsg_displayTemplates', __('Verwendete Templates anzeigen (Nur im Frontend)', 'wpsg'), $this->get_option('wpsg_displayTemplates'), array('help' => 'wpsg_displayTemplates')); ?>
 				<?php echo wpsg_drawForm_Checkbox('wpsg_displayTemplatesLog', __('Verwendete Templates in Entwicklerkonsole anzeigen', 'wpsg'), $this->get_option('wpsg_displayTemplatesLog'), array('help' => 'wpsg_displayTemplatesLog')); ?>
