From b4cd2ad59440171ea330ddaad28b4743d4936b51 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 9 Jul 2010 09:24:49 +0300 Subject: better logging --- MainApp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MainApp.php') diff --git a/MainApp.php b/MainApp.php index 4bf4543..96050b0 100644 --- a/MainApp.php +++ b/MainApp.php @@ -130,7 +130,7 @@ class MainApp static function error($msg) { - $err = array('result' => 'error', 'msg' => $msg); + $err = array('error' => $msg); trigger_error($msg, E_USER_ERROR); // And log it locally self::log($msg); @@ -158,7 +158,7 @@ class MainApp foreach (func_get_args() as $arg) { - if (is_array($arg)) { + if (is_array($arg) || is_object($arg)) { $arg = print_r($arg, true); } fwrite($fh, date('r') . "\t" . trim($arg) . "\n"); -- cgit v1.2.3