Logging

object Logging
class Object
trait Matchable
class Any

Value members

Methods

def addTimestamp[A](self: Logger[A]): URIO[Clock, Logger[A]]

Add timestamp annotation to every message

def console(logLevel: LogLevel, format: LogFormat[String]): ZLayer[Console & Clock, Nothing, Logging]
def consoleErr(logLevel: LogLevel, format: LogFormat[String]): ZLayer[Console & Clock, Nothing, Logging]
def debug(line: => String): ZIO[Logging, Nothing, Unit]
def derive(f: LogContext => LogContext): ZIO[Logging, Nothing, Logger[String]]
def error(line: => String): ZIO[Logging, Nothing, Unit]
def error(line: => String, cause: Cause[Any]): ZIO[Logging, Nothing, Unit]
def file(destination: Path, charset: Charset, autoFlushBatchSize: Int, bufferedIOSize: Option[Int], logLevel: LogLevel, format: LogFormat[String]): ZLayer[Console & Clock, Throwable, Logging]
def fileAsync(destination: Path, charset: Charset, autoFlushBatchSize: Int, bufferedIOSize: Option[Int], logLevel: LogLevel, format: LogFormat[String]): ZLayer[Console & Clock, Throwable, Logging]
def info(line: => String): ZIO[Logging, Nothing, Unit]
def locally[A, R <: Logging, E, A1](fn: LogContext => LogContext)(zio: ZIO[R, E, A1]): ZIO[Logging & R, E, A1]
def locallyM[A, R <: Logging, E, A1](fn: LogContext => URIO[R, LogContext])(zio: ZIO[R, E, A1]): ZIO[Logging & R, E, A1]
def log(level: LogLevel)(line: => String): ZIO[Logging, Nothing, Unit]
def make: URLayer[Appender[String], Logging]
def modifyLogger(fn: Logger[String] => Logger[String]): ZLayer[Logging, Nothing, Logging]
def modifyLoggerM[R, E](fn: Logger[String] => ZIO[R, E, Logger[String]]): ZLayer[Logging & R, E, Logging]
def throwable(line: => String, t: Throwable): ZIO[Logging, Nothing, Unit]
def trace(line: => String): ZIO[Logging, Nothing, Unit]
def warn(line: => String): ZIO[Logging, Nothing, Unit]
def withContext(context: LogContext): ZLayer[Logging, Nothing, Logging]

modify initial context

def withRootLoggerName(name: String): ZLayer[Logging, Nothing, Logging]

Adds root logger name

Fields

val ignore: Layer[Nothing, Logging]