← ZIO Logging docs

LogLevelByNameConfig

zio.logging.LogFilter.LogLevelByNameConfig
See theLogLevelByNameConfig companion object
final case class LogLevelByNameConfig(rootLevel: LogLevel, mappings: Map[String, LogLevel])

Defines a filter from a list of log-levels specified per tree node

Example:

 val filter =
   logLevelByName(
    LogLevel.Debug,
    "io.netty"                                       -> LogLevel.Info,
    "io.grpc.netty"                                  -> LogLevel.Info
)

will use the Debug log level for everything except for log events with the logger name prefixed by either List("io", "netty") or List("io", "grpc", "netty"). Logger name is extracted from Trace.

Value parameters

mappings

List of mappings, nesting defined by dot-separated strings

rootLevel

Minimum log level for the root node

Attributes

Companion
object
Source
LogFilter.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def toFilter[M]: LogFilter[M]

Attributes

Source
LogFilter.scala

Attributes

Source
LogFilter.scala

Attributes

Source
LogFilter.scala

Attributes

Source
LogFilter.scala

Inherited methods

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala