akka.stream

extra

package extra

Content Hierarchy Learn more about scaladoc diagrams
Visibility
  1. Public
  2. All

Type Members

  1. class Log[T] extends Transformer[T, T] with TransformerLogging

    Logs the elements, error and completion of a a flow.

    Logs the elements, error and completion of a a flow.

    By default it logs onNext and onComplete at info log level, and onError at error log level. Subclass may customize the logging by overriding #logOnNext, #logOnComplete and #logOnError.

    The logSource of the akka.event.Logging.LogEvent is the path of the actor processing this step in the flow. It contains the flow name and the #name of this Transformer. The name can be customized with the #name constructor parameter.

    The akka.event.LoggingAdapter is accessible under the name log.

    Usage:

    Flow(List(1, 2, 3)).transform(new Log[Int](name = "mylog") {
      override def logOnNext(i: Int): Unit =
        log.debug("Got element {}", i)
    }).
    consume(materializer)

    Or with the implicit enrichment:

    import akka.stream.extra.Implicits._
    Flow(List(1, 2, 3)).log().consume(materializer)
  2. trait TransformerLogging extends AnyRef

    Scala API: Mix in TransformerLogging into your akka.stream.Transformer to obtain a reference to a logger, which is available under the name #log.

Value Members

  1. object Implicits

    Additional akka.stream.scaladsl.Flow and akka.stream.scaladsl.Duct operators.

  2. object Log

  3. object Timed extends TimedOps with TimedIntervalBetweenOps

Ungrouped