The LogActor
is a Coral Actor that logs the received trigger JSON object.
The actor can write incoming messages to a file or it can send them to the same log as where Coral platform log messages are written to (by default, this is standard out). This is useful for debugging purposes.
The LogActor has "type": "log"
. The params
value is optional and has the following fields:
field | type | required | description |
---|---|---|---|
file |
string | no | location of the file to log to. If not provided, the log settings of the platform are used. |
append |
boolean | no | when true, the actor appends to a possibily existing file, otherwise a possibly existing the file is overwritten. |
This will create a log actor that appends the received trigger JSON to the file /tmp/coral.log
. If no params
value is given, the log settings of the Coral platform will be used:
By default, this means that JSON objects will then be sent to standard out.
The LogActor
only does useful work if JSON objects come in through its trigger.
The LogActor
emits nothing. Conceptually, writing the trigger message to file or to a log can be thought of as an emit.
The LogActor
does not keep state.
The LogActor
does not collect state from other actors.
The LogActor
does not provide timer actions.