当前位置: 首页>>代码示例>>PHP>>正文


PHP Log::UPTO方法代码示例

本文整理汇总了PHP中Log::UPTO方法的典型用法代码示例。如果您正苦于以下问题:PHP Log::UPTO方法的具体用法?PHP Log::UPTO怎么用?PHP Log::UPTO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Log的用法示例。


在下文中一共展示了Log::UPTO方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Log_firebug

 /**
  * Constructs a new Log_firebug object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_firebug($name = '', $ident = 'PHP', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['buffering'])) {
         $this->_buffering = $conf['buffering'];
     }
     if ($this->_buffering) {
         register_shutdown_function(array(&$this, '_Log_firebug'));
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:36,代码来源:firebug.php

示例2: Log_console

 /**
  * Constructs a new Log_console object.
  * 
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_console($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     $this->_id = md5(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (!empty($conf['stream'])) {
         $this->_stream = $conf['stream'];
     }
     if (isset($conf['buffering'])) {
         $this->_buffering = $conf['buffering'];
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
     /*
      * If output buffering has been requested, we need to register a
      * shutdown function that will dump the buffer upon termination.
      */
     if ($this->_buffering) {
         register_shutdown_function(array(&$this, '_Log_console'));
     }
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:34,代码来源:console.php

示例3: Log_file

 /**
  * Constructs a new Log_file object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param array  $maxLevel Maximum priority level at which to log.
  * @access public
  */
 function Log_file($name, $ident = '', $conf = array(), $maxLevel = PEAR_LOG_DEBUG)
 {
     $this->_id = md5(microtime());
     $this->_filename = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($maxLevel);
     if (isset($conf['append'])) {
         $this->_append = $conf['append'];
     }
     if (!empty($conf['mode'])) {
         $this->_mode = $conf['mode'];
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
     if (!empty($conf['eol'])) {
         $this->_eol = $conf['eol'];
     } else {
         $this->_eol = strstr(PHP_OS, 'WIN') ? "\r\n" : "\n";
     }
     register_shutdown_function(array(&$this, '_Log_file'));
 }
开发者ID:amjadtbssm,项目名称:website,代码行数:34,代码来源:file.php

示例4: Log_console

 /**
  * Constructs a new Log_console object.
  * 
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_console($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (!empty($conf['stream'])) {
         $this->_stream = $conf['stream'];
     }
     if (isset($conf['buffering'])) {
         $this->_buffering = $conf['buffering'];
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
     /*
      * If output buffering has been requested, we need to register a
      * shutdown function that will dump the buffer upon termination.
      */
     if ($this->_buffering) {
         register_shutdown_function(array(&$this, '_Log_console'));
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:43,代码来源:console.php

示例5: Log_display

 /**
  * Constructs a new Log_display object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_display($name = '', $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['error_prepend'])) {
         $this->_error_prepend = $conf['error_prepend'];
     } else {
         $this->_error_prepend = ini_get('error_prepend_string');
     }
     if (isset($conf['error_append'])) {
         $this->_error_append = $conf['error_append'];
     } else {
         $this->_error_append = ini_get('error_append_string');
     }
     if (isset($conf['linebreak'])) {
         $this->_linebreak = $conf['linebreak'];
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:37,代码来源:display.php

示例6: __construct

 /**
  * Constructs a new Log_console object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 public function __construct($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     $this->_id = md5(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (!empty($conf['stream'])) {
         $this->_stream = $conf['stream'];
     } elseif (defined('STDOUT')) {
         $this->_stream = STDOUT;
     } else {
         $this->_stream = fopen('php://output', 'a');
         $this->_closeResource = true;
     }
     if (isset($conf['buffering'])) {
         $this->_buffering = $conf['buffering'];
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
     /*
      * If output buffering has been requested, we need to register a
      * shutdown function that will dump the buffer upon termination.
      */
     if ($this->_buffering) {
         register_shutdown_function(array(&$this, '_Log_console'));
     }
 }
开发者ID:michabbb,项目名称:Log,代码行数:39,代码来源:console.php

示例7: Log_daemon

 /**
  * Constructs a new syslog object.
  *
  * @param string $name     The syslog facility.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $maxLevel Maximum level at which to log.
  * @access public
  */
 function Log_daemon($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     /* Ensure we have a valid integer value for $name. */
     if (empty($name) || !is_int($name)) {
         $name = LOG_SYSLOG;
     }
     $this->_id = md5(microtime());
     $this->_name = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['ip'])) {
         $this->_ip = $conf['ip'];
     }
     if (isset($conf['proto'])) {
         $this->_proto = $conf['proto'];
     }
     if (isset($conf['port'])) {
         $this->_port = $conf['port'];
     }
     if (isset($conf['maxsize'])) {
         $this->_maxsize = $conf['maxsize'];
     }
     if (isset($conf['timeout'])) {
         $this->_timeout = $conf['timeout'];
     }
     $this->_proto = $this->_proto . '://';
     register_shutdown_function(array(&$this, '_Log_daemon'));
 }
开发者ID:altesien,项目名称:FinalProject,代码行数:37,代码来源:daemon.php

示例8: logif

 public static function logif($level = PEAR_LOG_DEBUG)
 {
     static $mask = NULL;
     if ($mask === NULL) {
         $mask = Log::UPTO(WF_LOG_LEVEL);
     }
     return 1 << $level & $mask ? true : false;
 }
开发者ID:apinstein,项目名称:phocoa,代码行数:8,代码来源:WFLog.php

示例9: WordPressOpenID

 function WordPressOpenID()
 {
     $this->log =& Log::singleton('error_log', PEAR_LOG_TYPE_SYSTEM, 'OpenID');
     //$this->log = &Log::singleton('file', ABSPATH . get_option('upload_path') . '/php.log', 'WPOpenID');
     // Set the log level
     $wpopenid_log_level = constant('PEAR_LOG_' . strtoupper(WPOPENID_LOG_LEVEL));
     $this->log->setMask(Log::UPTO($wpopenid_log_level));
 }
开发者ID:alx,项目名称:alexgirard.com-blog,代码行数:8,代码来源:core.php

示例10: GetLogger

 /**
  * Get the shared instance for the logger
  * @return \Log
  */
 public static function GetLogger()
 {
     $log = new \Log("this message is ignored, however not supplying one throws an error :o/");
     $logger = $log->singleton('file', Setup::Configuration()->CachingDirectory . "/log.log", '   ');
     if (!self::Configuration()->EnableDebugLogging) {
         $mask = \Log::UPTO(\PEAR_LOG_INFO);
         $logger->setMask($mask);
     }
     return $logger;
 }
开发者ID:ultimateprogramer,项目名称:Swiftriver,代码行数:14,代码来源:Setup.php

示例11: Log_syslog

 /**
  * Constructs a new syslog object.
  *
  * @param string $name     The syslog facility.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_syslog($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     /* Ensure we have a valid integer value for $name. */
     if (empty($name) || !is_int($name)) {
         $name = LOG_SYSLOG;
     }
     $this->_id = md5(microtime());
     $this->_name = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
 }
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:20,代码来源:syslog.php

示例12: Log_mcal

 /**
  * Constructs a new Log_mcal object.
  *
  * @param string $name     The category to use for our events.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_mcal($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     $this->_id = md5(microtime());
     $this->_name = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     $this->_calendar = $conf['calendar'];
     $this->_username = $conf['username'];
     $this->_password = $conf['password'];
     $this->_options = $conf['options'];
 }
开发者ID:rodrigoprestesmachado,项目名称:whiteboard,代码行数:20,代码来源:mcal.php

示例13: setUp

 public function setUp()
 {
     $this->log_file = "/tmp/log_file.test";
     // delete $log_file...
     if (file_exists($this->log_file)) {
         unlink($this->log_file);
     }
     $this->logger = Log::factory('file', $this->log_file, 'AdvancedDVDLibrary');
     $mask = Log::UPTO(PEAR_LOG_DEBUG);
     $this->logger->setMask($mask);
 }
开发者ID:ahiliation,项目名称:beautifulwork,代码行数:11,代码来源:LogTest.php

示例14: Log_error_log

 /**
  * Constructs a new Log_error_log object.
  * 
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_error_log($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     $this->_id = md5(microtime());
     $this->_type = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (!empty($conf['destination'])) {
         $this->_destination = $conf['destination'];
     }
     if (!empty($conf['extra_headers'])) {
         $this->_extra_headers = $conf['extra_headers'];
     }
 }
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:22,代码来源:error_log.php

示例15: Log_win

 /**
  * Constructs a new Log_win object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_win($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     $this->_id = md5(microtime());
     $this->_name = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['title'])) {
         $this->_title = $conf['title'];
     }
     if (isset($conf['colors']) && is_array($conf['colors'])) {
         $this->_colors = $conf['colors'];
     }
     register_shutdown_function(array(&$this, '_Log_win'));
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:23,代码来源:win.php


注:本文中的Log::UPTO方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。