add debug logging and do some from the remotesubscribe page
darcs-hash:20080530182230-84dde-b9b6f515affcd245abb5e199de02a8891138ff2a.gz
This commit is contained in:
18
lib/util.php
18
lib/util.php
@@ -553,3 +553,21 @@ function common_timestamp() {
|
||||
function _t($str) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
function common_ensure_syslog() {
|
||||
static $initialized = false;
|
||||
if (!$initialized) {
|
||||
define_syslog_variables();
|
||||
openlog("laconica", LOG_PID, LOG_USER);
|
||||
$initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
function common_log($priority, $msg) {
|
||||
common_ensure_syslog();
|
||||
syslog($priority, $msg);
|
||||
}
|
||||
|
||||
function common_debug($msg) {
|
||||
common_log(LOG_DEBUG, $msg);
|
||||
}
|
||||
Reference in New Issue
Block a user