3 final class PhabricatorAccessLog
extends Phobject
{
7 public static function init() {
8 // NOTE: This currently has no effect, but some day we may reuse PHP
9 // interpreters to run multiple requests. If we do, it has the effect of
10 // throwing away the old log.
14 public static function getLog() {
16 $path = PhabricatorEnv
::getEnvConfig('log.access.path');
17 $format = PhabricatorEnv
::getEnvConfig('log.access.format');
20 "[%D]\t%p\t%h\t%r\t%u\t%C\t%m\t%U\t%R\t%c\t%T");
22 // NOTE: Path may be null. We still create the log, it just won't write
25 $log = id(new PhutilDeferredLog($path, $format))
26 ->setFailQuietly(true)
30 'h' => php_uname('n'),
33 'I' => PhabricatorEnv
::getEnvConfig('cluster.instance'),