summaryrefslogtreecommitdiffstats
path: root/lib/Log.php
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-22 09:12:23 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-08-22 09:21:39 +0100
commitf5bf35eeef976d91215587dd4a9bcbc00fbdc3a1 (patch)
tree6ada6bc34e2fb0b8f8727847c2358d249711eef6 /lib/Log.php
parent594d5eac43ff71de3a7fa6c5d1d6cf98bd65b662 (diff)
downloadwebadmin-f5bf35eeef976d91215587dd4a9bcbc00fbdc3a1.tar.gz
Allow lib/Log.php functions to get a series of parameters that it'll just var_export()
Diffstat (limited to 'lib/Log.php')
-rw-r--r--lib/Log.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/Log.php b/lib/Log.php
index ed01332..88d62c2 100644
--- a/lib/Log.php
+++ b/lib/Log.php
@@ -159,11 +159,20 @@ class Log
$date, $sess_id ? "($sess_id)" : '', $prefix, $message);
if (!empty($args)) {
- if ($args['file']) {
- $logline .= ' in ' . $args['file'];
+ if (is_array($args)) {
+ if (array_key_exists('file', $args)) {
+ $logline .= ' in ' . $args['file'];
+ unset($args['file']);
+ }
+
+ if (array_key_exists('line', $args)) {
+ $logline .= ' on line ' . intval($args['line']);
+ unset($args['line']);
+ }
}
- if ($args['line']) {
- $logline .= ' on line ' . intval($args['line']);
+
+ if (!empty($args)) {
+ $logline .= var_export($args, TRUE);
}
}