本文整理汇总了PHP中Log::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Log::__construct方法的具体用法?PHP Log::__construct怎么用?PHP Log::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Log
的用法示例。
在下文中一共展示了Log::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
Log::__construct();
Log::Location();
$this->SetServer();
$this->MemberIsRank();
}
示例2: __construct
public function __construct($var)
{
gen_time('class/UrlTranslator');
parent::__construct();
$this->rules = $var;
$this->args = self::rest_url_translator();
}
示例3: __construct
public function __construct($error_file_name, $registry)
{
parent::__construct($error_file_name);
$this->registry = $registry;
$this->config = $registry->get('config');
$this->session = $registry->get('session');
unset($this->session->data['warning']);
}
示例4: __construct
/**
* Class constructor
*
* @param string $file
*/
public function __construct($file)
{
if (is_resource($file)) {
$this->stream = $file;
} else {
$this->file = $file;
}
parent::__construct();
}
示例5: __construct
public function __construct($line)
{
$matches = array();
parent::__construct($line);
if (! $this->extra_data)
{
return;
}
# Regular Expression Map:
# '(31564).(general).(critical): (.*)'
# '(live).(31564).(general).(critical): (.*)'
# '(live).(r26781.)(31564).(general).(critical): (.*)'
# '(live).(r26781.)(19426).(general).(error)( (req:19426:211)): (.*)'
if (preg_match('!^([a-z-]+\.)?(r\d+\.)?(\d+)\.([a-z_]+)\.([a-z]+)( +\(req:\d+:\d+.*?\))?: *(.*)!i', $this->extra_data, $matches))
{
$this->extra_data = null;
if (strlen($matches[1]))
{
$this->ruby_configuration = substr($matches[1], 0, -1);
}
if (strlen($matches[2]))
{
$this->ruby_revision = substr($matches[2], 1, -1);
}
$this->ruby_pid = $matches[3];
$this->ruby_component = $matches[4];
$this->ruby_error_level = $matches[5];
if (strlen($matches[6]))
{
$this->ruby_request_identifier = trim($matches[6]);
}
$this->ruby_error_message = $matches[7];
switch ($this->ruby_error_level)
{
case 'critical':
case 'error':
case 'warning':
case 'info':
case 'debug':
case 'trace':
case 'spam':
$this->error_level = $this->ruby_error_level;
break;
}
}
}
示例6: date
function __construct($args = NULL)
{
parent::__construct($args);
if (@file_exists($this->getLogPath())) {
$this->open();
} else {
$this->open("OVERRIDE");
$this->writeToLog("Symphony Log", true);
$this->writeToLog("Opened: " . date("d.m.Y G:i:s"), true);
$this->writeToLog("Build: " . $args["symphony"]["build"], true);
$this->writeToLog("--------------------------------------------", true);
$this->writeToLog("Environment Variables", true);
$this->writeToLog("--------------------------------------------", true);
$constants = @get_defined_constants(true);
if (!empty($constants) && is_array($constants)) {
foreach ($constants["user"] as $key => $val) {
$this->writeToLog(General::padString($key, 30) . ": \t {$val}", true);
}
}
$this->writeToLog("--------------------------------------------", true);
}
}
示例7:
function __construct()
{
parent::__construct();
}
示例8: __construct
public function __construct($logDirectory)
{
parent::__construct(self::$CONSTfileName, $logDirectory);
}
示例9: __construct
/**
* Class constructor
*
* @param DB_Table|string $table DB_Table or table name (string)
* @param array $fields Mapping of keys to field names
*/
public function __construct($table, $fields)
{
$this->table = $table;
$this->fields = $fields;
parent::__construct();
}
示例10: __construct
public function __construct($line)
{
$matches = array();
parent::__construct($line);
if (! $this->extra_data)
{
return;
}
# Regular Expression Map:
# '((live)) (/prefs.php) ((User Notice)) (.*)'
# '(()) (/prefs.php) ((Warning)) (.*)'
if (preg_match('!^\(([a-z]*)\) (\S+) +\((\w+ ?\w+)\) +(.*)!i', $this->extra_data, $matches))
{
$this->extra_data = null;
if (strlen($matches[1]))
{
$this->php_configuration = $matches[1];
}
$this->php_script_name = $matches[2];
$this->php_error_level = $matches[3];
$this->php_error_message = $matches[4];
switch ($this->php_error_level)
{
case 'Error':
case 'User Error':
$this->error_level = 'error';
break;
case 'Notice':
case 'User Notice':
$this->error_level = 'info';
break;
case 'Warning':
case 'User Warning':
$this->error_level = 'warning';
break;
case 'PHP Strict':
$this->error_level = 'spam';
break;
}
}
# Regular Expression Map:
# '(/cache/templates/forums/forumviewthread.parsed.php):(117) (.*)'
if (preg_match('!^([^:]+):(\d+) +(.*)!', $this->php_error_message, $matches))
{
$this->php_script_path = $matches[1];
$this->php_script_lineno = $matches[2];
$this->php_error_message = $matches[3];
}
# Regular Expression Map:
# '([3296920/)(75.157.111.45]) (.*)'
# '([anon/)(202.175.26.145]) (.*)'
if (preg_match('!^(\[[ano0-9-]+/)([0-9.]+\]) +(.*)!', $this->php_error_message, $matches))
{
$this->client_uid = $matches[1];
$this->client_ip = $matches[2];
$this->php_error_message = $matches[3];
}
}
示例11: __construct
public function __construct()
{
gen_time('class/DB');
$this->makeConnection();
parent::__construct();
}
示例12: __construct
public function __construct($program_name = null, $host = null, $port = null)
{
parent::__construct();
if (is_null($program_name)) {
$program_name = LOG_SYSLOG_PROGRAM;
}
if (is_null($host)) {
$host = LOG_SYSLOG_HOST;
}
if (is_null($port)) {
$port = LOG_SYSLOG_PORT;
}
$this->SetProgramName($program_name);
$this->SetHost($host);
$this->SetPort($port);
}
示例13: __construct
/**
* Class constructor
*
* @param string $to E-mail recipient
*/
public function __construct($props = array())
{
if (isset($props[0])) {
$props['to'] = $props[0];
}
unset($props[0]);
parent::__construct($props);
if (empty($this->headers['From'])) {
$this->headers['From'] = ini_get('sendmail_from');
}
if (empty($this->headers['From'])) {
$this->headers['From'] = 'system@' . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : php_uname('n'));
}
}