Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121644734
PhabricatorLogTriggerAction.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
Sat, Jul 12, 18:53
Size
692 B
Mime Type
text/x-php
Expires
Mon, Jul 14, 18:53 (2 d)
Engine
blob
Format
Raw Data
Handle
27366026
Attached To
rPH Phabricator
PhabricatorLogTriggerAction.php
View Options
<?php
/**
* Trivial action which logs a message.
*
* This action is primarily useful for testing triggers.
*/
final
class
PhabricatorLogTriggerAction
extends
PhabricatorTriggerAction
{
public
function
validateProperties
(
array
$properties
)
{
PhutilTypeSpec
::
checkMap
(
$properties
,
array
(
'message'
=>
'string'
,
));
}
public
function
execute
(
$last_epoch
,
$this_epoch
)
{
$message
=
pht
(
'(%s -> %s @ %s) %s'
,
$last_epoch
?
date
(
'Y-m-d g:i:s A'
,
$last_epoch
)
:
'null'
,
date
(
'Y-m-d g:i:s A'
,
$this_epoch
),
date
(
'Y-m-d g:i:s A'
,
PhabricatorTime
::
getNow
()),
$this
->
getProperty
(
'message'
));
phlog
(
$message
);
}
}
Event Timeline
Log In to Comment