Packages

p

zio

logging

package logging

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

Type Members

  1. final case class ConsoleLoggerConfig(format: LogFormat, filter: LogFilter[String]) extends Product with Serializable
  2. final case class FileLoggerConfig(destination: Path, format: LogFormat, filter: LogFilter[String], charset: Charset = StandardCharsets.UTF_8, autoFlushBatchSize: Int = 1, bufferedIOSize: Option[Int] = None) extends Product with Serializable
  3. final case class LogAnnotation[A](name: String, combine: (A, A) ⇒ A, render: (A) ⇒ String)(implicit evidence$1: Tag[A]) extends Product with Serializable

    A LogAnnotation describes a particular type of statically-typed log annotation applied to log lines.

    A LogAnnotation describes a particular type of statically-typed log annotation applied to log lines. Log annotations combine in user-defined ways, which means they can have arbitrary structure. In the end, however, it must be possible to render each log annotation as a string.

    myEffect @@ UserId("jdoe")
  4. final case class LogColor extends AnyVal with Product with Serializable
  5. final case class LogContext extends Product with Serializable

    A LogContext stores context associated with logging operations.

  6. sealed trait LogFilter[-Message] extends AnyRef

    A LogFilter represents function/conditions for log filtering

  7. trait LogFormat extends AnyRef

    A LogFormat represents a DSL to describe the format of text log messages.

    A LogFormat represents a DSL to describe the format of text log messages.

    import zio.logging.LogFormat._
    timestamp.fixed(32) |-| level |-| label("message", quoted(line))
  8. trait LogGroup[-Message, Out] extends AnyRef
  9. trait LoggerNameExtractor extends AnyRef

Value Members

  1. def consoleErrJsonLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  2. def consoleErrJsonLogger(config: ConsoleLoggerConfig): ZLayer[Any, Nothing, Unit]
  3. def consoleErrLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  4. def consoleErrLogger(config: ConsoleLoggerConfig): ZLayer[Any, Nothing, Unit]
  5. def consoleJsonLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  6. def consoleJsonLogger(config: ConsoleLoggerConfig): ZLayer[Any, Nothing, Unit]
  7. def consoleLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  8. def consoleLogger(config: ConsoleLoggerConfig): ZLayer[Any, Nothing, Unit]
  9. def fileAsyncJsonLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  10. def fileAsyncJsonLogger(config: FileLoggerConfig): ZLayer[Any, Nothing, Unit]
  11. def fileAsyncLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  12. def fileAsyncLogger(config: FileLoggerConfig): ZLayer[Any, Nothing, Unit]
  13. def fileJsonLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  14. def fileJsonLogger(config: FileLoggerConfig): ZLayer[Any, Nothing, Unit]
  15. def fileLogger(configPath: String = "logger"): ZLayer[Any, Error, Unit]
  16. def fileLogger(config: FileLoggerConfig): ZLayer[Any, Nothing, Unit]
  17. val logContext: FiberRef[LogContext]

    The logContext fiber reference is used to store typed, structured log annotations, which can be utilized by backends to enrich log messages.

    The logContext fiber reference is used to store typed, structured log annotations, which can be utilized by backends to enrich log messages.

    Because logContext is an ordinary zio.FiberRef, it may be get, set, and updated like any other fiber reference. However, the idiomatic way to interact with logContext is by using zio.logging.LogAnnotation.

    For example:

    myResponseHandler(request) @@ UserId(request.userId)

    This code would add the structured log annotation LogAnnotation.UserId to all log messages emitted by the myResponseHandler(request) effect.

  18. val logMetrics: ZLayer[Any, Nothing, Unit]
  19. def logMetricsWith(name: String, logLevelLabel: String): ZLayer[Any, Nothing, Unit]
  20. def loggerName(value: String): ZIOAspect[Nothing, Any, Nothing, Any, Nothing, Any]

    Logger name aspect, by this aspect is possible to set logger name (in general, logger name is extracted from Trace)

    Logger name aspect, by this aspect is possible to set logger name (in general, logger name is extracted from Trace)

    annotation key: zio.logging.loggerNameAnnotationKey

  21. val loggerNameAnnotationKey: String

    log aspect annotation key for logger name

  22. val removeDefaultLoggers: ZLayer[Any, Nothing, Unit]
  23. object ConsoleLoggerConfig extends Serializable
  24. object FileLoggerConfig extends Serializable
  25. object LogAnnotation extends Serializable
  26. object LogColor extends Serializable
  27. object LogContext extends Serializable
  28. object LogFilter
  29. object LogFormat
  30. object LogGroup
  31. object LoggerNameExtractor

Deprecated Value Members

  1. def console(format: LogFormat, logFilter: LogFilter[String]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleLogger

  2. def console(format: LogFormat = LogFormat.colored, logLevel: LogLevel = LogLevel.Info): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleLogger

  3. def consoleErr(format: LogFormat, logFilter: LogFilter[String]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleErrLogger

  4. def consoleErr(format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleErrLogger

  5. def consoleErrJson(format: LogFormat, logFilter: LogFilter[String]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleErrJsonLogger

  6. def consoleErrJson(format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleErrJsonLogger

  7. def consoleJson(format: LogFormat, logFilter: LogFilter[String]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleJsonLogger

  8. def consoleJson(format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.consoleJsonLogger

  9. def file(destination: Path, format: LogFormat, logFilter: LogFilter[String], charset: Charset, autoFlushBatchSize: Int, bufferedIOSize: Option[Int]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileLogger

  10. def file(destination: Path, format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info, charset: Charset = StandardCharsets.UTF_8, autoFlushBatchSize: Int = 1, bufferedIOSize: Option[Int] = None): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileLogger

  11. def fileAsync(destination: Path, format: LogFormat, logFilter: LogFilter[String], charset: Charset, autoFlushBatchSize: Int, bufferedIOSize: Option[Int]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileAsyncLogger

  12. def fileAsync(destination: Path, format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info, charset: Charset = StandardCharsets.UTF_8, autoFlushBatchSize: Int = 1, bufferedIOSize: Option[Int] = None): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileAsyncLogger

  13. def fileAsyncJson(destination: Path, format: LogFormat, logFilter: LogFilter[String], charset: Charset, autoFlushBatchSize: Int, bufferedIOSize: Option[Int]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileAsyncJsonLogger

  14. def fileAsyncJson(destination: Path, format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info, charset: Charset = StandardCharsets.UTF_8, autoFlushBatchSize: Int = 1, bufferedIOSize: Option[Int] = None): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileAsyncJsonLogger

  15. def fileJson(destination: Path, format: LogFormat, logFilter: LogFilter[String], charset: Charset, autoFlushBatchSize: Int, bufferedIOSize: Option[Int]): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileJsonLogger

  16. def fileJson(destination: Path, format: LogFormat = LogFormat.default, logLevel: LogLevel = LogLevel.Info, charset: Charset = StandardCharsets.UTF_8, autoFlushBatchSize: Int = 1, bufferedIOSize: Option[Int] = None): ZLayer[Any, Nothing, Unit]
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1.10) use zio.logging.fileJsonLogger

Inherited from AnyRef

Inherited from Any

Ungrouped