Packages

trait FlowBehavior[B] extends AnyRef

A type class that is used to provide a behavior to a logging flow.

You can implement your own behavior and place it in scope for the code that you're using:

private implicit def flowBehavior[B: ToArguments]: FlowBehavior[B] = new FlowBehavior[B] {
  override def createEntryStatement(source: FlowBehavior.Source): Option[Statement] = {
    Some(
      Statement().withMessage(s"${source.enclosing.value} entry")
    )
  }
}

You can use the createEntryStatement to start a timer and then complete it on exit/throwing, or use the flow as hooks into the tracing framework.

Source
FlowBehavior.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FlowBehavior
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toany2stringadd[FlowBehavior[B]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (FlowBehavior[B], B)
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toArrowAssoc[FlowBehavior[B]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def ensuring(cond: (FlowBehavior[B]) => Boolean, msg: => Any): FlowBehavior[B]
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toEnsuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (FlowBehavior[B]) => Boolean): FlowBehavior[B]
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toEnsuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: => Any): FlowBehavior[B]
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toEnsuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): FlowBehavior[B]
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toEnsuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def entryMarkers(source: Source): Markers

    Returns the markers used by the flow logger method on entry.

    Returns the markers used by the flow logger method on entry.

    source

    the source info

    returns

    the entry markers, empty by default.

  13. def entryStatement(source: Source): Option[Statement]

    Creates an entry statement, if specified.

    Creates an entry statement, if specified.

    source

    the source info

    returns

    the entry statement, None by default.

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def exitMarkers(source: Source): Markers

    Provides exit markers for the predicate.

    Provides exit markers for the predicate.

    source

    the source info

    returns

    exit markers, empty by default.

  17. def exitStatement(resultValue: B, source: Source): Option[Statement]

    Returns an exit statement, using the result value and the source.

    Returns an exit statement, using the result value and the source.

    resultValue

    the result of the flow.

    source

    the source info

    returns

    the statement, None by default.

  18. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toStringFormat[FlowBehavior[B]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def throwingStatement(exc: Throwable, source: Source): Option[(Level, Statement)]

    Returns a tuple describing the statement and the level to log the exception at; if you return (Level.ERROR, statement) then it will log the exception at error level, for example.

    Returns a tuple describing the statement and the level to log the exception at; if you return (Level.ERROR, statement) then it will log the exception at error level, for example.

    exc

    the throwable returned from flow

    source

    the source info

    returns

    a tuple containing the statement and the level to execute the throwing statement.

  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def [B](y: B): (FlowBehavior[B], B)
    Implicit
    This member is added by an implicit conversion from FlowBehavior[B] toArrowAssoc[FlowBehavior[B]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromFlowBehavior[B] to any2stringadd[FlowBehavior[B]]

Inherited by implicit conversion StringFormat fromFlowBehavior[B] to StringFormat[FlowBehavior[B]]

Inherited by implicit conversion Ensuring fromFlowBehavior[B] to Ensuring[FlowBehavior[B]]

Inherited by implicit conversion ArrowAssoc fromFlowBehavior[B] to ArrowAssoc[FlowBehavior[B]]

Ungrouped