本文整理汇总了PHP中ZLog::syslogEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP ZLog::syslogEnabled方法的具体用法?PHP ZLog::syslogEnabled怎么用?PHP ZLog::syslogEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZLog
的用法示例。
在下文中一共展示了ZLog::syslogEnabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Initialize
/**
* Initializes the logging
*
* @access public
* @return boolean
*/
public static function Initialize()
{
global $specialLogUsers;
if (defined('LOG_SYSLOG_ENABLED') && LOG_SYSLOG_ENABLED) {
self::$syslogEnabled = true;
ZSyslog::Initialize();
}
// define some constants for the logging
if (!defined('LOGUSERLEVEL')) {
define('LOGUSERLEVEL', LOGLEVEL_OFF);
}
if (!defined('LOGLEVEL')) {
define('LOGLEVEL', LOGLEVEL_OFF);
}
list($user, ) = Utils::SplitDomainUser(strtolower(Request::GetGETUser()));
self::$userLog = in_array($user, $specialLogUsers);
if (!defined('WBXML_DEBUG') && $user) {
// define the WBXML_DEBUG mode on user basis depending on the configurations
if (LOGLEVEL >= LOGLEVEL_WBXML || LOGUSERLEVEL >= LOGLEVEL_WBXML && self::$userLog) {
define('WBXML_DEBUG', true);
} else {
define('WBXML_DEBUG', false);
}
}
if ($user) {
self::$user = '[' . $user . '] ';
} else {
self::$user = '';
}
// log the device id if the global loglevel is set to log devid or the user is in and has the right log level
if (Request::GetDeviceID() != "" && (LOGLEVEL >= LOGLEVEL_DEVICEID || LOGUSERLEVEL >= LOGLEVEL_DEVICEID && self::$userLog)) {
self::$devid = '[' . Request::GetDeviceID() . '] ';
} else {
self::$devid = '';
}
return true;
}