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


PHP Debugger::getLogger方法代码示例

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


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

示例1: onStartup

 public function onStartup(Application $app)
 {
     if (!extension_loaded('newrelic')) {
         return;
     }
     $oldLogger = Debugger::getLogger();
     $logger = new Logger($oldLogger->directory, $oldLogger->email);
     $logger->emailSnooze = $oldLogger->emailSnooze;
     $logger->mailer = $oldLogger->mailer;
     Debugger::setLogger($logger);
 }
开发者ID:enumag,项目名称:newrelic-nette-1,代码行数:11,代码来源:NewRelicProfilingListener.php

示例2: getLogger

 /**
  * @return Logger
  */
 public static function getLogger()
 {
     if (!static::$logger) {
         static::$logger = new Logger(static::$logDirectory, static::$email, static::getBlueScreen());
         static::$logger->directory =& Tracy\Debugger::$logDirectory;
         // back compatiblity
         static::$logger->email =& Tracy\Debugger::$email;
         Tracy\Debugger::setLogger(static::$logger);
     }
     return Tracy\Debugger::getLogger();
 }
开发者ID:trejjam,项目名称:utils,代码行数:14,代码来源:Debugger.php

示例3: register

 /**
  * @param Container $app
  *
  * @return mixed
  *
  * @throws DependencyInstanceNotFound
  */
 public function register(Container $app)
 {
     /** @var Application $app */
     $config = $this->config;
     // this service provider will quietly fail if Tracy is not installed.
     if (class_exists('\\Tracy\\Debugger') and $config->get('logging.tracy.enabled')) {
         // use the environment to configure the Debugger
         $env = env('APP_ENV') === 'PRODUCTION' ? Debugger::PRODUCTION : Debugger::DEVELOPMENT;
         Debugger::$maxDepth = $config->get('logging.tracy.maxDepth', 6);
         Debugger::enable($env, rtrim($config->get('logging.logPath', LOGS), '/'));
         Debugger::$showLocation = env('DEBUG') and $config->get('logging.tracy.showLocation', FALSE);
         Debugger::$strictMode = $config->get('logging.tracy.strictMode', FALSE);
         Debugger::$showBar = FALSE;
         # env('DEBUG');
         // use the Tracy Debugger for logging.
         $app['tracy'] = Debugger::getLogger();
         $app['nine.logger'] = function ($app) {
             return $app['tracy'];
         };
     }
 }
开发者ID:formula9,项目名称:framework,代码行数:28,代码来源:TracyServiceProvider.php

示例4: onStartup

 /**
  * @param Nette\Application\Application $app
  */
 public function onStartup(Nette\Application\Application $app)
 {
     Consumerr::setUrl(Tracy\Debugger::$source);
     Consumerr::addExtension(NetteConsumerr::EXTENSION_NAME, NetteConsumerr::VERSION_CODE);
     if (class_exists('Nette\\Framework')) {
         Consumerr::addLibrary('nette-framework', Nette\Framework::VERSION_ID);
     }
     if (class_exists('Tracy\\Debugger') && property_exists('Tracy\\Debugger', 'version')) {
         $version = str_replace('-dev', ".99", Tracy\Debugger::$version);
         $version = explode(".", $version);
         Consumerr::addLibrary('tracy', $version[0] * 10000 + $version[1] * 100 + $version[2]);
     }
     $logger = $this->createLogger();
     if (method_exists('Tracy\\Debugger', 'getLogger')) {
         Tracy\Debugger::setLogger($logger);
         Tracy\Debugger::getLogger()->directory =& Tracy\Debugger::$logDirectory;
         Tracy\Debugger::getLogger()->email =& Tracy\Debugger::$email;
     } else {
         Tracy\Debugger::$logger = $logger;
         Tracy\Debugger::$logger->directory =& Tracy\Debugger::$logDirectory;
         Tracy\Debugger::$logger->email =& Tracy\Debugger::$email;
     }
 }
开发者ID:consumerr,项目名称:nette,代码行数:26,代码来源:NetteConsumerr.php

示例5: elapsed_time_since_request

<?php

/**
 * @package Og
 * @version 0.1.0
 * @author  Greg Truesdell <odd.greg@gmail.com>
 */
use Og\Forge;
use Og\Support\Util;
use Tracy\Debugger;
use Tracy\FireLogger;
Debugger::$maxDepth = 6;
Debugger::enable(Debugger::DEVELOPMENT, LOCAL_LOGS);
Debugger::$showLocation = TRUE;
$logger = Debugger::getLogger();
Forge::getInstance()->instance(['logger', FireLogger::class], $logger);
/**
 * @param bool $raw
 *
 * @return string
 */
function elapsed_time_since_request($raw = FALSE)
{
    return !$raw ? sprintf("%8.1f ms", (microtime(TRUE) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000) : (microtime(TRUE) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000;
}
/**
 * @param $index
 *
 * @return string
 */
function location_from_backtrace($index = 2)
开发者ID:anctemarry27,项目名称:cogs,代码行数:31,代码来源:debug.php

示例6: __construct

 /**
  * @param array $logLevels
  */
 public function __construct(array $logLevels)
 {
     $this->oldLogger = \Tracy\Debugger::getLogger();
     $this->logLevels = $logLevels;
 }
开发者ID:vrtak-cz,项目名称:newrelic-tracy,代码行数:8,代码来源:Logger.php

示例7: Configurator

<?php

use Arachne\Bootstrap\Configurator;
use Tracy\Debugger;
// Load autoloader generated by Composer
require __DIR__ . '/../vendor/autoload.php';
// Normalized internal encoding
mb_internal_encoding('UTF-8');
// Normalized locale settings
$locale = 'en_US.UTF-8';
setlocale(LC_ALL, $locale);
putenv('LC_ALL=' . $locale);
$configurator = new Configurator();
$configurator->addParameters(['appDir' => __DIR__, 'wwwDir' => __DIR__ . '/../www']);
$configurator->enableDebugger(__DIR__ . '/../log', 'enumag@gmail.com');
Debugger::getLogger()->emailSnooze = '1 hour';
// Specify folder for cache
$configurator->setTempDirectory(__DIR__ . '/../temp');
// Create Dependency Injection container from config.neon file
$configurator->addConfig(__DIR__ . '/config/config.neon', false);
return $configurator->createContainer();
开发者ID:enumag,项目名称:arachne-forms-example,代码行数:21,代码来源:bootstrap.php

示例8: function

});
Container::extensionMethod('addDateTimePicker', function (Container $container, $name, $label = NULL) {
    return $container[$name] = new Controls\DateTimePicker($label);
});
Container::extensionMethod('addTypeahead', function (Container $container, $name, $label = NULL, $callback = NULL) {
    return $container[$name] = new Controls\Typeahead($label, $callback);
});
$configurator = new Nette\Configurator();
if (DEV_MODE === TRUE) {
    $configurator->setDebugMode(TRUE);
} elseif (isset($debugIPs)) {
    $configurator->setDebugMode($debugIPs);
}
$configurator->enableDebugger(DIR_ROOT . '/log', isset($debugMail) ? $debugMail : NULL);
$configurator->setTempDirectory(DIR_ROOT . '/temp');
if (!isset($robotLoaderDirs)) {
    $robotLoaderDirs = [];
}
$robotLoaderDirs[] = DIR_VENDOR . '/cothema/';
$robotLoaderDirs[] = DIR_ROOT . '/app/';
$robotLoader = $configurator->createRobotLoader();
foreach ($robotLoaderDirs as $robotLoaderDirsOne) {
    $robotLoader->addDirectory($robotLoaderDirsOne);
}
$robotLoader->register();
$configurator->addConfig(__DIR__ . '/config/config.neon');
is_file(DIR_ROOT . '/app/config/config.neon') && $configurator->addConfig(DIR_ROOT . '/app/config/config.neon');
$configurator->addConfig(DIR_ROOT . '/app/config/config.local.neon');
$container = $configurator->createContainer();
\Tracy\Debugger::getLogger()->emailSnooze = isset($debugMailSnooze) ? $debugMailSnooze : '30 minutes';
return $container;
开发者ID:cothema,项目名称:cmsbe,代码行数:31,代码来源:bootstrap.php

示例9: log

 public function log($level, $msg)
 {
     Debugger::getLogger()->log($msg, self::LEVEL);
 }
开发者ID:WebChemistry,项目名称:RollBar,代码行数:4,代码来源:Logger.php


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