Formatter

object Formatter
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def create(throwableFormat: ThrowableFormat, colorful: Boolean): Formatter
def create(throwableFormat: ThrowableFormat, positionFormat: PositionFormat, colorful: Boolean, printCtx: Boolean): Formatter

Creates new formatter with provided options

Creates new formatter with provided options

Value Params
colorful

use different color for thread name, level, position and throwable

positionFormat

@see formatPosition

printCtx

whether the context is printed in the log

throwableFormat

@see formatThrowable

def formatCtx(context: Map[String, String]): String
def formatPosition(position: Position, format: PositionFormat): String

The result differs depending on the format:

The result differs depending on the format:

PositionFormat.Full - prints full position 'io.odin.formatter.Formatter formatPosition:75' formatted as 'io.odin.formatter.Formatter formatPosition:75'

PositionFormat.AbbreviatePackage - prints abbreviated package and full enclosing 'io.odin.formatter.Formatter formatPosition:75' formatted as 'i.o.f.Formatter formatPosition:75'

def formatThrowable(t: Throwable, format: ThrowableFormat): String

Default Throwable printer is twice as slow. This method was borrowed from scribe library.

Default Throwable printer is twice as slow. This method was borrowed from scribe library.

The result differs depending on the format: ThrowableFormat.Depth.Full - prints all elements of a stack trace ThrowableFormat.Depth.Fixed - prints N elements of a stack trace ThrowableFormat.Indent.NoIndent - prints a stack trace without indentation ThrowableFormat.Indent.Fixed - prints a stack trace prepending every line with N spaces

def formatTimestamp(timestamp: Long): String

Formats timestamp using the following format: yyyy-MM-ddTHH:mm:ss,SSS

Formats timestamp using the following format: yyyy-MM-ddTHH:mm:ss,SSS

Concrete fields

val BRIGHT_BLACK: String