Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104630042
PhabricatorAccessLog.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Mar 11, 01:31
Size
923 B
Mime Type
text/x-php
Expires
Thu, Mar 13, 01:31 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24815732
Attached To
rPH Phabricator
PhabricatorAccessLog.php
View Options
<?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"
);
if
(!
$path
)
{
return
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
;
}
}
Event Timeline
Log In to Comment