本文整理汇总了PHP中Symfony\Component\HttpKernel\Kernel::getLogDir方法的典型用法代码示例。如果您正苦于以下问题:PHP Kernel::getLogDir方法的具体用法?PHP Kernel::getLogDir怎么用?PHP Kernel::getLogDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpKernel\Kernel
的用法示例。
在下文中一共展示了Kernel::getLogDir方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLogDir
public function getLogDir()
{
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
return sprintf('/tmp/symfony/music/log/%s', $this->environment);
}
return parent::getLogDir();
}
示例2: getLogDir
public function getLogDir()
{
if (array_key_exists('LOG_DIR', $_ENV)) {
return $_ENV['LOG_DIR'] . DIRECTORY_SEPARATOR . $this->environment;
}
return parent::getLogDir();
}
示例3: getLogDir
public function getLogDir()
{
if ($this->gcsBucketName) {
return sprintf('gs://%s/symfony/log', $this->gcsBucketName);
}
return parent::getLogDir();
}
示例4: getLogDir
public function getLogDir()
{
if ($this->getRootDir() === '/vagrant/app' && in_array($this->environment, ['dev', 'test'])) {
return '/dev/shm/appname/logs';
}
return parent::getLogDir();
}
示例5: getLogDir
public function getLogDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return sys_get_temp_dir() . '/jumph/logs';
}
return parent::getLogDir();
}
示例6: getLogDir
public function getLogDir()
{
if ($this->vagrant) {
return '/dev/shm/sages/logs/';
}
return parent::getLogDir();
}
示例7: getLogDir
/**
* {@inheritdoc}
*/
public function getLogDir()
{
if ($this->isVagrantEnvironment()) {
return '/dev/shm/composer-service/logs';
}
return parent::getLogDir();
}
示例8: getLogDir
/**
* @see \Symfony\Component\HttpKernel\Kernel::getLogDir()
*/
public function getLogDir()
{
if (in_array($this->environment, ['dev', 'test'])) {
return '/dev/shm/librarian/logs';
}
return parent::getLogDir();
}
示例9: getLogDir
public function getLogDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return '/dev/shm/symfony/logs';
}
return parent::getLogDir();
}
示例10: getLogDir
public function getLogDir()
{
if (in_array($this->getEnvironment(), array('dev', 'ci'))) {
return '/dev/shm/' . $this->getEnvironment() . '/logs/';
}
return parent::getLogDir();
}
示例11: getLogDir
public function getLogDir()
{
if (in_array($this->environment, ['dev', 'test']) && $this->logDir) {
return $this->logDir;
}
return parent::getLogDir();
}
示例12: getLogDir
public function getLogDir()
{
if (in_array($this->environment, array('dev', 'test'))) {
return $this->getRootDir() . '/logs';
}
return parent::getLogDir();
}
示例13: getLogDir
public function getLogDir()
{
if (false !== getEnv('OPENSHIFT_LOG_DIR')) {
return getEnv('OPENSHIFT_LOG_DIR');
} else {
return parent::getLogDir();
}
}
示例14: getLogDir
public function getLogDir()
{
if ($this->getEnvironment() == 'prod') {
if (!is_dir(sys_get_temp_dir() . '/sf2standard/logs')) {
mkdir(sys_get_temp_dir() . '/sf2standard/logs', 0777, true);
}
return sys_get_temp_dir() . '/sf2standard/logs';
}
return parent::getLogDir();
}
示例15: getLogDir
/**
* Returns path to cache dir.
*
* See README on how to override this
*
* @return string
* @throws RuntimeException
*/
public function getLogDir()
{
static $s_dir;
if ($s_dir) {
return $s_dir;
}
if (self::DEFAULT_LOGS_DIR && (is_dir(self::DEFAULT_LOGS_DIR) || @mkdir(self::DEFAULT_LOGS_DIR, 0777, true)) && is_writeable(self::DEFAULT_LOGS_DIR)) {
return $s_dir = self::DEFAULT_LOGS_DIR;
}
$symfonyDefaultDir = parent::getLogDir();
if (is_dir($symfonyDefaultDir) && is_writeable($symfonyDefaultDir)) {
return $s_dir = $symfonyDefaultDir;
}
throw new \RuntimeException("Unable to write log file!" . PHP_EOL . "This is because:" . PHP_EOL . (self::DEFAULT_LOGS_DIR ? "* Configured directory '" . self::DEFAULT_LOGS_DIR . "' does not exist, can not be created or is not writable for the current user." : "* No configured directory ('logs_dir' setting in module_janus.php).") . PHP_EOL . "* And default logs dir '{$symfonyDefaultDir}' does not exist or is not writable for the current user.");
}