Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99477297
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
Fri, Jan 24, 21:46
Size
692 B
Mime Type
text/x-php
Expires
Sun, Jan 26, 21:46 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23801979
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