本文整理汇总了PHP中Tracy\Debugger::logDirectory方法的典型用法代码示例。如果您正苦于以下问题:PHP Debugger::logDirectory方法的具体用法?PHP Debugger::logDirectory怎么用?PHP Debugger::logDirectory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tracy\Debugger
的用法示例。
在下文中一共展示了Debugger::logDirectory方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$grav = Grav::instance();
/** @var Config $config */
$config = $grav['config'];
$mode = $config->get('system.debugger.mode');
TracyDebugger::$logDirectory = $config->get('system.debugger.log.enabled') ? LOG_DIR : null;
TracyDebugger::$maxDepth = $config->get('system.debugger.max_depth');
// Switch debugger into development mode if configured
if ($config->get('system.debugger.enabled')) {
if ($config->get('system.debugger.strict')) {
TracyDebugger::$strictMode = true;
}
if (function_exists('ini_set')) {
ini_set('display_errors', true);
}
if ($mode == strtolower('detect')) {
TracyDebugger::$productionMode = self::DETECT;
} elseif ($mode == strtolower('production')) {
TracyDebugger::$productionMode = self::PRODUCTION;
} else {
TracyDebugger::$productionMode = self::DEVELOPMENT;
}
}
}
示例2: onBootstrap
/**
* {@inheritDoc}
*/
public function onBootstrap(EventInterface $event)
{
/**
* @var ModuleOptions $moduleOptions
*/
$moduleOptions = $event->getTarget()->getServiceManager()->get('LemoTracy\\Options\\ModuleOptions');
if (true === $moduleOptions->getEnabled()) {
if (null !== $moduleOptions->getMode()) {
Debugger::enable($moduleOptions->getMode());
}
if (null !== $moduleOptions->getLogDirectory()) {
Debugger::$logDirectory = $moduleOptions->getLogDirectory();
}
if (null !== $moduleOptions->getLogSeverity()) {
Debugger::$logSeverity = $moduleOptions->getLogSeverity();
}
if (null !== $moduleOptions->getMaxDepth()) {
Debugger::$maxDepth = $moduleOptions->getMaxDepth();
}
if (null !== $moduleOptions->getMaxLen()) {
Debugger::$maxLen = $moduleOptions->getMaxLen();
}
if (null !== $moduleOptions->getShowBar()) {
Debugger::$showBar = $moduleOptions->getShowBar();
}
if (null !== $moduleOptions->getStrict()) {
Debugger::$strictMode = $moduleOptions->getStrict();
}
}
}
示例3: setup
/**
* Setup testing environment
* @param string $rootDir absolute path to the root of the project
* @global string $_GLOBALS['TEMP_DIR'] TEMP_DIR is defined here
*/
public static function setup($rootDir)
{
// configure environment
umask(0);
Environment::setup();
class_alias('Tester\\Assert', 'Assert');
date_default_timezone_set('Europe/Prague');
// create temporary directory
$uniqueName = isset($_SERVER['argv']) ? md5(serialize($_SERVER['argv'])) : getmypid();
define('TEMP_DIR', $rootDir . '/tmp/' . $uniqueName);
Helpers::purge(TEMP_DIR);
@chmod(TEMP_DIR, 0777);
// intentional silencer
Debugger::$logDirectory = TEMP_DIR;
}
示例4: setup
public static function setup($rootDir)
{
// configure environment
umask(0);
Tester\Environment::setup();
class_alias('Tester\\Assert', 'Assert');
date_default_timezone_set('Europe/Prague');
// create temporary directory
define('TEMP_DIR', $rootDir . '/tmp/' . (isset($_SERVER['argv']) ? md5(serialize($_SERVER['argv'])) : getmypid()));
Tester\Helpers::purge(TEMP_DIR);
@chmod(TEMP_DIR, 0777);
Tracy\Debugger::$logDirectory = TEMP_DIR;
// $_SERVER = array_intersect_key($_SERVER, array_flip(array(
// 'PHP_SELF', 'SCRIPT_NAME', 'SERVER_ADDR', 'SERVER_SOFTWARE', 'HTTP_HOST', 'DOCUMENT_ROOT', 'OS', 'argc', 'argv'
// )));
$_SERVER['REQUEST_TIME'] = 1234567890;
$_ENV = $_GET = $_POST = $_FILES = array();
}
示例5: boot
public function boot()
{
Debugger::$logDirectory = $this->container->getParameter('kutny_tracy.exceptions_directory');
Debugger::$email = $this->container->getParameter('kutny_tracy.emails');
}
示例6: __construct
public function __construct()
{
Debugger::$logDirectory = $this->getLogDir();
}