Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97572265
ConduitAPI_daemon_log_Method.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
Sun, Jan 5, 09:26
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Jan 7, 09:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23429294
Attached To
rPH Phabricator
ConduitAPI_daemon_log_Method.php
View Options
<?php
/**
* @group conduit
*/
final
class
ConduitAPI_daemon_log_Method
extends
ConduitAPIMethod
{
public
function
shouldRequireAuthentication
()
{
// TODO: Lock this down once we build phantoms.
return
false
;
}
public
function
shouldAllowUnguardedWrites
()
{
return
true
;
}
public
function
getMethodDescription
()
{
return
"Used by daemons to log events."
;
}
public
function
defineParamTypes
()
{
return
array
(
'daemonLogID'
=>
'required int'
,
'type'
=>
'required string'
,
'message'
=>
'optional string'
,
);
}
public
function
defineReturnType
()
{
return
'void'
;
}
public
function
defineErrorTypes
()
{
return
array
(
);
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$daemon_event
=
new
PhabricatorDaemonLogEvent
();
$daemon_event
->
setLogID
(
$request
->
getValue
(
'daemonLogID'
));
$daemon_event
->
setLogType
(
$request
->
getValue
(
'type'
));
$daemon_event
->
setMessage
((
string
)
$request
->
getValue
(
'message'
));
$daemon_event
->
setEpoch
(
time
());
$daemon_event
->
save
();
return
;
}
}
Event Timeline
Log In to Comment