LogFormat

zio.logging.LogFormat
See theLogFormat companion object
sealed trait LogFormat

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))

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

final def +(other: LogFormat): LogFormat

Returns a new log format which concats both formats together without any separator between them.

Returns a new log format which concats both formats together without any separator between them.

Attributes

final def color(color: LogColor): LogFormat

Returns a new log format that produces the same output as this one, but with the specified color applied.

Returns a new log format that produces the same output as this one, but with the specified color applied.

Attributes

The alphanumeric version of the + operator.

The alphanumeric version of the + operator.

Attributes

final def filter[M >: String](filter: LogFilter[M]): LogFormat

Returns a new log format that produces the same as this one, if filter is satisfied

Returns a new log format that produces the same as this one, if filter is satisfied

Attributes

final def fixed(size: Int): LogFormat

Returns a new log format that produces the same as this one, but with a space-padded, fixed-width output. Be careful using this operator, as it destroys all structure, resulting in purely textual log output.

Returns a new log format that produces the same as this one, but with a space-padded, fixed-width output. Be careful using this operator, as it destroys all structure, resulting in purely textual log output.

Attributes

Returns a new log format that produces the same as this one, except that log levels are colored according to the specified mapping.

Returns a new log format that produces the same as this one, except that log levels are colored according to the specified mapping.

Attributes

final def highlight: LogFormat

Returns a new log format that produces the same as this one, except that the log output is highlighted.

Returns a new log format that produces the same as this one, except that the log output is highlighted.

Attributes

The alphanumeric version of the |-| operator.

The alphanumeric version of the |-| operator.

Attributes

Converts this log format into a json logger, which accepts text input, and produces json output.

Converts this log format into a json logger, which accepts text input, and produces json output.

Attributes

final def toLogger: ZLogger[String, String]

Converts this log format into a text logger, which accepts text input, and produces text output.

Converts this log format into a text logger, which accepts text input, and produces text output.

Attributes

final def |-|(other: LogFormat): LogFormat

Returns a new log format which concats both formats together with a space character between them.

Returns a new log format which concats both formats together with a space character between them.

Attributes