]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/debug/class_DebugErrorLogOutput.php
Several debug things (e.g. for timing) added
[core.git] / inc / classes / main / debug / class_DebugErrorLogOutput.php
index 809dc3c553209487cd8111369b0e49f7edc4189a..3fa1f719d5c34cf2957bd488f4b51971f350b4ed 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -53,15 +53,19 @@ class DebugErrorLogOutput extends BaseFrameworkSystem implements Debugger, Outpu
         */
        public final function outputStream ($output) {
                // Split multiple lines into and array to put them out line-by-line
-               $errorLines = explode("\n", $output);
+               $errorLines = explode(chr(10), $output);
+
+               // "Walk" through all lines
                foreach ($errorLines as $err) {
+                       // Trim any spaces, \n, \r etc. out
                        $err = trim($err);
+
                        // Log only none-empty lines
                        if (!empty($err)) {
                                // Log this line
                                error_log(html_entity_decode(strip_tags($err)), 0);
-                       }
-               }
+                       } // END - if
+               } // END - foreach
        }
 
        /**