CORAL WIKI

LogActor

The LogActor (log actor) is a Coral Actor that logs the received trigger JSON. The actor isn’t meant for production use, but for usage during testing the pipeline. In production, the pipeline should send the results to Kafka using the KafkaProducerActor.

Creating a LogActor

The creation JSON of the log actor (see Coral Actor) has type: "log". The params value has the following fields:

field type   description
file string required location of the file to log to.
append boolean optional when true, the actor appends to a possibily existing file, otherwise a possibly existing the file is overwritten.

Example

{
  "data": {
    "type": "actors",
    "attributes": {
      "type": "log",
      "params": {
        "file": "/tmp/coral.log",
        "append": true
      }
    }
  }
}

This will create a log actor that appends the received trigger JSON to the file /tmp/coral.log.

Trigger

The LogActor only does useful work if the trigger is connected.

Emit

The LogActor emits nothing. Conceptually, the writing to the output file can be thought of as emit.

State

The LogActor doesn’t keep state.

Collect

The LogActor does not collect state from other actors.

Timer

The LogActor does not provide timer actions.