object LogZIO
- Alphabetic
- By Inheritance
- LogZIO
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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
-
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
- def withDynamicContext[R](logger: AbstractLogger)(dynamic: ZIO[R, Nothing, CustomContext]): LogIO2[[β$1$, γ$2$]ZIO[R, β$1$, γ$2$]]
- def withFiberId(logger: AbstractLogger): LogIO2[IO]
-
object
log extends LogIO3AskImpl[ZIO]
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!") }