Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82650362
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
Thu, Sep 12, 16:06
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Sep 14, 16:06 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
20726244
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