summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-04 22:47:17 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-04 22:47:17 -0400
commitea40a9cd936e3e6cd0b5ac1c29d32112e7985247 (patch)
tree42b8fe59b45e215feb7a197d7eb947c4cace019d /lib/util.php
parentd241352dcc2c641bcf97efee596c0cfba4d34dc5 (diff)
move filename stuff to debug function
darcs-hash:20080605024717-84dde-dc897a855af13ea30bb670daf94749e9f14fa7ad.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 7171211da..03b1e42a9 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -577,20 +577,22 @@ function common_ensure_syslog() {
if (!$initialized) {
global $config;
define_syslog_variables();
- openlog($config['site']['appname'], 0, LOG_USER);
+ openlog($config['syslog']['appname'], 0, LOG_USER);
$initialized = true;
}
}
function common_log($priority, $msg, $filename=NULL) {
common_ensure_syslog();
- if ($filename) {
- syslog($priority, basename($filename).' - '.$msg);
- }
+ syslog($priority, $msg);
}
function common_debug($msg, $filename=NULL) {
- common_log(LOG_DEBUG, $msg, $filename);
+ if ($filename) {
+ common_log(LOG_DEBUG, basename($filename).' - '.$msg);
+ } else {
+ common_log(LOG_DEBUG, $msg);
+ }
}
function common_valid_http_url($url) {