diff --git a/dev/Debug.php b/dev/Debug.php index 708c55bc6..2107846d0 100644 --- a/dev/Debug.php +++ b/dev/Debug.php @@ -170,6 +170,29 @@ class Debug { } } + /** + * Log to a standard text file output. + * + * @param $message string to output + */ + static function log($message) { + $file = dirname(__FILE__).'/../../debug.log'; + $now = date('r'); + $oldcontent = file_get_contents($file); + $content = $oldcontent . "\n\n== $now ==\n$message\n"; + file_put_contents($file, $content); + } + + private static $warning_pos = 220; + + static function warning($notice) { + echo '
'; + echo '
Warning:
'; + echo '

'.$notice.'

'; + echo '
'; + self::$warning_pos = self::$warning_pos-50; + } + /** * Load error handlers into environment */ diff --git a/dev/DebugView.php b/dev/DebugView.php index 351f24b90..4595e09df 100644 --- a/dev/DebugView.php +++ b/dev/DebugView.php @@ -1,4 +1,9 @@