本文整理匯總了PHP中ZLog::userLog方法的典型用法代碼示例。如果您正苦於以下問題:PHP ZLog::userLog方法的具體用法?PHP ZLog::userLog怎麽用?PHP ZLog::userLog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ZLog
的用法示例。
在下文中一共展示了ZLog::userLog方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Initialize
/**
* Initializes the logging
*
* @access public
* @return boolean
*/
public static function Initialize()
{
global $specialLogUsers;
// 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;
}