Logger

trait Logger[-A]
Companion
object
class Object
trait Matchable
class Any
class LoggerWithFormat[R, A]

Value members

Methods

final def contramap[A1](f: A1 => A): Logger[A1]

Produces a new logger by adapting a different input type to the input type of this logger.

def debug(line: => A): UIO[Unit]

Logs the specified element at the debug level.

def debugM[R, E](line: ZIO[R, E, A]): ZIO[R, E, Unit]

Evaluates the specified element based on the LogLevel set and logs at the debug level

Derives a new logger from this one, by applying the specified decorator to the logger context.

def deriveM[R](f: LogContext => ZIO[R, Nothing, LogContext]): ZIO[R, Nothing, Logger[A]]

Derives a new logger from this one, by applying the specified decorator to the logger context.

def error(line: => A): UIO[Unit]

Logs the specified element at the error level.

def error(line: => A, cause: Cause[Any]): UIO[Unit]

Logs the specified element at the error level with cause.

def errorM[R, E](line: ZIO[R, E, A]): ZIO[R, E, Unit]

Evaluates the specified element based on the LogLevel set and logs at the error level

def errorM[R, E](line: ZIO[R, E, A], cause: Cause[Any]): ZIO[R, E, Unit]

Evaluates the specified element based on the LogLevel set and logs at the error level

def info(line: => A): UIO[Unit]

Logs the specified element at the info level

def infoM[R, E](line: ZIO[R, E, A]): ZIO[R, E, Unit]

Evaluates the specified element based on the LogLevel set and logs at the info level

def locally[R1, E, A1](f: LogContext => LogContext)(zio: ZIO[R1, E, A1]): ZIO[R1, E, A1]

Modifies the log context in the scope of the specified effect.

final def locallyAnnotate[B, R, E, A1](annotation: LogAnnotation[B], value: B)(zio: ZIO[R, E, A1]): ZIO[R, E, A1]

Modifies the annotate in the scope of the specified effect.

def locallyM[R1, E, A1](f: LogContext => URIO[R1, LogContext])(zio: ZIO[R1, E, A1]): ZIO[R1, E, A1]

Modifies the log context with effect in the scope of the specified effect.

def log(line: => A): UIO[Unit]

Logs the specified element using an inherited log level.

def log(level: LogLevel)(line: => A): UIO[Unit]

Logs the specified element at the specified level. Implementations may override this for greater efficiency.

Retrieves the log context.

def named(name: String): Logger[A]

Produces a named logger.

def throwable(line: => A, t: Throwable): UIO[Unit]

Logs the specified element at the error level with exception.

def trace(line: => A): UIO[Unit]

Logs the specified element at the trace level.

def traceM[R, E](line: ZIO[R, E, A]): ZIO[R, E, Unit]

Evaluates the specified element based on the LogLevel set and logs at the trace level

def warn(line: => A): UIO[Unit]

Logs the specified element at the warn level.

def warnM[R, E](line: ZIO[R, E, A]): ZIO[R, E, Unit]

Evaluates the specified element based on the LogLevel set and logs at the warn level