Source for file logging.php
Documentation is available at logging.php
* Flat file logging of Bumblebee events
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
require_once 'inc/bb/configreader.php';
function logmsg($priority, $message) {
if (! $conf->value('error_handling', 'UseLogFile') ||
$priority >=
$conf->value('error_handling', 'LogLevel')) return;
// IP username (uid) [DD/Mon/YYYY:HH:MM:SS TZ] "action" "Message"\n
$date =
gmdate("d/M/Y:H:i:s O");
$ip =
is_object($auth) ?
$auth->getRemoteIP() :
'-';
$username =
is_object($auth) ?
$auth->username :
'-';
$verb =
is_object($action) ?
$action->_verb :
'-';
$logstring =
"$ip $username ($uid) [$date] \"$verb\" \"$message\"\n";
error_log($logstring, 3, $conf->value('error_handling', 'LogFile'));
Documentation generated on Tue, 06 Mar 2007 10:01:44 +0000 by phpDocumentor 1.3.0