Trait/Object

com.tersesystems.blindsight.flow

FlowBehavior

Related Docs: object FlowBehavior | package flow

Permalink

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
Known Subclasses
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. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to any2stringadd[FlowBehavior[B]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (FlowBehavior[B], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to ArrowAssoc[FlowBehavior[B]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  8. def ensuring(cond: (FlowBehavior[B]) ⇒ Boolean, msg: ⇒ Any): FlowBehavior[B]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to Ensuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (FlowBehavior[B]) ⇒ Boolean): FlowBehavior[B]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to Ensuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): FlowBehavior[B]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to Ensuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): FlowBehavior[B]

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to Ensuring[FlowBehavior[B]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def entryMarkers(source: Source): Markers

    Permalink

    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]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  16. def exitMarkers(source: Source): Markers

    Permalink

    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]

    Permalink

    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

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to StringFormat[FlowBehavior[B]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def throwingStatement(exc: Throwable, source: Source): Option[(Level, Statement)]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def [B](y: B): (FlowBehavior[B], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from FlowBehavior[B] to ArrowAssoc[FlowBehavior[B]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

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

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

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

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

Ungrouped