Ignore:
Timestamp:
Apr 15, 2010, 10:40:35 PM (15 years ago)
Author:
Pieter Naber
Message:

Created interlinks!
Fixed LogHandler to output at the end (so we have a valid KML file)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/inc/LogHandler.class.php

    r7765 r7773  
    3636
    3737class LogHandler {
     38        private $logString;             // For caching purposes
     39
    3840        /*
    3941         * Function: __construct (constructor)
     
    4244         */
    4345        public function __construct() {
     46                $logString = '';
    4447        }
    4548
     
    8285                }
    8386
    84                 $time = date( "H:i.s m/d/y" );
    85                 $errorString .= ' (' . $logno .' | '.$time .' | ): ' . $logstr . "\r\n\t" . 'In file "' . $logfile . '" on line "' . $logline . '"' . "\r\n";
     87                $errorString .= ' (' . $logno . ' | ' . date('Y/d/m H:i:s') . '): ' . $logstr . "\r\n\t" . 'In file "' . $logfile . '" on line "' . $logline . '"' . "\r\n";
    8688
    8789                if ($logno <= LOG_LEVEL_ECHO) {
    88                         echo '<!-- ' . $errorString . ' -->';
     90                        $this->logString .= $errorString;
    8991                }
    9092                if ((!defined('IGNORE_LOG_LEVEL_WRITE')) && ($logno <= LOG_LEVEL_WRITE)) {
     
    118120                }
    119121        }
     122
     123        function __destruct() {
     124                echo '<!-- ' . $this->logString . ' -->';
     125        }
    120126}
    121127
Note: See TracChangeset for help on using the changeset viewer.