object LogZIO

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LogZIO
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Service = LogIO[[γ$1$]ZIO[Any, Nothing, γ$1$]]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addFiberIdToLogger[G[_], R, E, A](logger: AbstractLoggerF[G])(f: (Self) => ZIO[R, E, A]): ZIO[R, E, A]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. def withCustomContext[R, E, A](context: CustomContext)(thunk: ZIO[R, E, A])(implicit arg0: Tag[R]): ZIO[R with LogZIO, E, A]

    Allows to provide logging context which will be passed through the given effect via ZIO environment.

    Allows to provide logging context which will be passed through the given effect via ZIO environment.

    import izumi.logstage.api.Log.CustomContext
    import logstage.LogZIO
    import logstage.LogZIO.log
    import zio.ZIO
    
    def databaseCall(): ZIO[LogZIO, Throwable, String] = ZIO.succeed("stubbed")
    
    def dbLayerFunction(arg: Int): ZIO[LogZIO, Throwable, String] = {
      LogZIO.withCustomContext(CustomContext("arg" -> arg)) {
        for {
          result <- databaseCall
          _ <- log.info(s"Database call $result") // … arg=1 Database call result=stubbed
        } yield result
      }
    }
    R

    environment of the provided effect

    E

    effect error type

    A

    effect return type

    context

    context to be provided

    thunk

    the effect for which context will be passed

    returns

    effect with the passed context

  22. def withCustomContext[R, E, A](context: (String, AnyEncoded)*)(thunk: ZIO[R, E, A])(implicit arg0: Tag[R]): ZIO[R with LogZIO, E, A]

    Allows to provide logging context which will be passed through the given effect via ZIO environment.

    Allows to provide logging context which will be passed through the given effect via ZIO environment.

    import logstage.LogZIO
    import logstage.LogZIO.log
    import zio.ZIO
    
    def databaseCall(): ZIO[LogZIO, Throwable, String] = ZIO.succeed("stubbed")
    
    def dbLayerFunction(arg: Int): ZIO[LogZIO, Throwable, String] = {
      LogZIO.withCustomContext("arg" -> arg) {
        for {
          result <- databaseCall
          _ <- log.info(s"Database call $result") // … arg=1 Database call result=stubbed
        } yield result
      }
    }
    R

    environment of the provided effect

    E

    effect error type

    A

    effect return type

    context

    context to be provided

    thunk

    the effect for which context will be passed

    returns

    effect with the passed context

  23. def withDynamicContext[R](logger: AbstractLoggerF[[γ$11$]ZIO[R, Nothing, γ$11$]])(dynamic: ZIO[R, Nothing, CustomContext]): LogIO2[[β$12$, γ$13$]ZIO[R, β$12$, γ$13$]]
  24. def withDynamicContext[R](logger: AbstractLogger)(dynamic: ZIO[R, Nothing, CustomContext]): LogIO2[[β$3$, γ$4$]ZIO[R, β$3$, γ$4$]]
  25. def withFiberId(logger: AbstractLoggerF[[β$8$]ZIO[Any, Nothing, β$8$]]): LogIO2[IO]
  26. def withFiberId(logger: AbstractLogger): LogIO2[IO]
  27. object log extends LogZIOImpl

    Lets you carry LogZIO capability in environment

    Lets you carry LogZIO capability in environment

    import logstage.LogZIO
    import logstage.LogZIO.log
    import zio.URIO
    
    def fn: URIO[LogZIO, Unit] = {
      log.info(s"I'm logging with ${log}stage!")
    }

Inherited from AnyRef

Inherited from Any

Ungrouped