Logger actor

Rocket.loggerFunction
logger(name = "LogActor")
logger(::Type{T}, name = "LogActor") where T

Creation operator for the LoggerActor actor.

Examples

using Rocket

actor = logger(Int)
actor isa LoggerActor{Int}

# output
true

See also: LoggerActor, AbstractActor

source
Rocket.LoggerActorType
LoggerActor{D}(name::String = "LogActor") where D

The LoggerActor logs all next!/error!/complete! events that are sent from an Observable.

Constructor arguments

  • name: name of the logger. Optional. Default is LogActor.

Examples

using Rocket

source = from([ 0, 1, 2 ])
subscribe!(source, LoggerActor{Int}())
;

# output

[LogActor] Data: 0
[LogActor] Data: 1
[LogActor] Data: 2
[LogActor] Completed
using Rocket

source = from([ 0, 1, 2 ])
subscribe!(source, LoggerActor{Int}("CustomName"))
;

# output

[CustomName] Data: 0
[CustomName] Data: 1
[CustomName] Data: 2
[CustomName] Completed

See also: Actor, logger

source