Page MenuHomePhorge

PhabricatorAccessLog.php
No OneTemporary

Size
991 B
Referenced Files
None
Subscribers
None

PhabricatorAccessLog.php

<?php
final class PhabricatorAccessLog {
static $log;
public static function init() {
// NOTE: This currently has no effect, but some day we may reuse PHP
// interpreters to run multiple requests. If we do, it has the effect of
// throwing away the old log.
self::$log = null;
}
public static function getLog() {
if (!self::$log) {
$path = PhabricatorEnv::getEnvConfig('log.access.path');
$format = PhabricatorEnv::getEnvConfig('log.access.format');
$format = nonempty(
$format,
"[%D]\t%p\t%h\t%r\t%u\t%C\t%m\t%U\t%R\t%c\t%T");
// NOTE: Path may be null. We still create the log, it just won't write
// anywhere.
$path = null;
$log = new PhutilDeferredLog($path, $format);
$log->setData(
array(
'D' => date('r'),
'h' => php_uname('n'),
'p' => getmypid(),
'e' => time(),
));
self::$log = $log;
}
return self::$log;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, May 4, 1:06 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
65160
Default Alt Text
PhabricatorAccessLog.php (991 B)

Event Timeline