Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalawag
    Definition Classes
    org
  • package timber
    Definition Classes
    scalawag
  • package api
    Definition Classes
    timber
  • package impl
    Definition Classes
    api
  • package level

    Contains composable traits that can be used to add many common level-specific log methods to your custom loggers.

    Contains composable traits that can be used to add many common level-specific log methods to your custom loggers. They are inspired by various legacy logging technologies.

    Each trait defines several methods for logging and level val that can be overridden to control the level at which those methods log entries. See Logger for an example.

    Another example that mixes in a ridiculous set of level methods:

    import org.scalawag.timber.api
    import org.scalawag.timber.api.Dispatcher
    import org.scalawag.timber.api.level._
    
    class Logger(override val attributes:Map[String,Any] = Map.empty, override val tags:Set[Tag] = Set.empty)(implicit dispatcher: Dispatcher)
      extends BaseLogger(attributes, tags)(dispatcher) with Emergency with Finest with Warning with Warn
    Definition Classes
    api
  • package style
    Definition Classes
    api
  • BaseLogger
  • Dispatcher
  • Entry
  • ImmediateMessage
  • Level
  • Logger
  • Message
  • Tag
  • ThreadAttributes

class Logger extends BaseLogger with Trace with Debug with Info with Warn with Error

Provides a BaseLogger that can be used out-of-the-box with a default set of level-specific log methods.

Linear Supertypes
Error, Warn, Info, Debug, Trace, BaseLogger, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Logger
  2. Error
  3. Warn
  4. Info
  5. Debug
  6. Trace
  7. BaseLogger
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Logger(attributes: Map[String, Any] = Map.empty, tags: Set[Tag] = Set.empty)(implicit dispatcher: Dispatcher)

    attributes

    the logger attributes that this logger associates with the entries it creates

    tags

    the tags that this logger associates with the entries it creates

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val attributes: Map[String, Any]
    Definition Classes
    LoggerBaseLogger
  6. def buildEntry(level: Option[Level], message: Option[Message], location: Option[LogCallLocation], entryTags: TraversableOnce[Tag]): Entry
    Attributes
    protected
    Definition Classes
    BaseLogger
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def debug(tags: TraversableOnce[Tag])(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Debug
  9. def debug(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Debug
  10. val debugLevel: Level

    Override to customize the level at which calls to debug create entries.

    Override to customize the level at which calls to debug create entries.

    Attributes
    protected[this]
    Definition Classes
    Debug
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def error(tags: TraversableOnce[Tag])(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Error
  14. def error(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Error
  15. val errorLevel: Level

    Override to customize the level at which calls to error create entries.

    Override to customize the level at which calls to error create entries.

    Attributes
    protected[this]
    Definition Classes
    Error
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def info(tags: TraversableOnce[Tag])(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Info
  20. def info(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Info
  21. val infoLevel: Level

    Override to customize the level at which calls to info create entries.

    Override to customize the level at which calls to info create entries.

    Attributes
    protected[this]
    Definition Classes
    Info
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def log(implicit location: LogCallLocation): Unit

    Submits an entry without a level, a Message or tags to the logging system.

    Submits an entry without a level, a Message or tags to the logging system. This essentially creates an entry with nothing but automatically-collected call metadata.

    location

    the source location of the method call (usually automatically fulfilled by LogCallLocation.capture())

    Definition Classes
    BaseLogger
  24. def log(message: Message)(implicit location: LogCallLocation): Unit

    Submits an entry with a Message but no level or tags to the logging system.

    Submits an entry with a Message but no level or tags to the logging system.

    message

    the message to include with the entry

    location

    the source location of the method call (usually automatically fulfilled by LogCallLocation.capture())

    Definition Classes
    BaseLogger
  25. def log(level: Level)(message: Message)(implicit location: LogCallLocation): Unit

    Submits an entry with a Message and level but no tags to the logging system.

    Submits an entry with a Message and level but no tags to the logging system.

    The message argument appears in an argument list by itself because this allows us to use a thunk or a tuple as the source of the implicit Message conversion. When it appears with other arguments, the appearance of the calling syntax goes downhill fast (e.g., having to wrap the thunk in parentheses or having to include extra parentheses around tuples). Similarly, tags is not a varargs parameter because the compiler prefers to perceive multiple arguments as possible Tags (and failing) rather than look for an implicit conversion from the tuple.

    level

    the level to use for the entry created

    message

    the message to include with the entry

    location

    the source location of the method call (usually automatically fulfilled by LogCallLocation.capture())

    Definition Classes
    BaseLogger
  26. def log(tags: TraversableOnce[Tag])(message: Message)(implicit location: LogCallLocation): Unit

    Submits an entry with a Message and tags but no level to the logging system.

    Submits an entry with a Message and tags but no level to the logging system.

    The message argument appears in an argument list by itself because this allows us to use a thunk or a tuple as the source of the implicit Message conversion. When it appears with other arguments, the appearance of the calling syntax goes downhill fast (e.g., having to wrap the thunk in parentheses or having to include extra parentheses around tuples). Similarly, tags is not a varargs parameter because the compiler prefers to perceive multiple arguments as possible Tags (and failing) rather than look for an implicit conversion from the tuple.

    tags

    additional tags to include with the entry

    message

    the message to include with the entry

    location

    the source location of the method call (usually automatically fulfilled by LogCallLocation.capture())

    Definition Classes
    BaseLogger
  27. def log(level: Level, tags: TraversableOnce[Tag] = Iterable.empty)(message: Message)(implicit location: LogCallLocation): Unit

    Submits an entry with a level, a message and maybe tags to the logging system.

    Submits an entry with a level, a message and maybe tags to the logging system.

    The message argument appears in an argument list by itself because this allows us to use a thunk or a tuple as the source of the implicit Message conversion. When it appears with other arguments, the appearance of the calling syntax goes downhill fast (e.g., having to wrap the thunk in parentheses or having to include extra parentheses around tuples). Similarly, tags is not a varargs parameter because the compiler prefers to perceive multiple arguments as possible Tags (and failing) rather than look for an implicit conversion from the tuple.

    level

    the level to use for the entry created

    tags

    additional tags to include with the entry

    message

    the message to include with the entry

    location

    the source location of the method call (usually automatically fulfilled by LogCallLocation.capture())

    Definition Classes
    BaseLogger
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  32. val tags: Set[Tag]
    Definition Classes
    LoggerBaseLogger
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. def trace(tags: TraversableOnce[Tag])(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Trace
  35. def trace(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Trace
  36. val traceLevel: Level

    Override to customize the level at which calls to trace create entries.

    Override to customize the level at which calls to trace create entries.

    Attributes
    protected[this]
    Definition Classes
    Trace
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  39. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  40. def warn(tags: TraversableOnce[Tag])(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Warn
  41. def warn(message: Message)(implicit location: LogCallLocation): Unit
    Definition Classes
    Warn
  42. val warnLevel: Level

    Override to customize the level at which calls to warn create entries.

    Override to customize the level at which calls to warn create entries.

    Attributes
    protected[this]
    Definition Classes
    Warn

Inherited from Error

Inherited from Warn

Inherited from Info

Inherited from Debug

Inherited from Trace

Inherited from BaseLogger

Inherited from AnyRef

Inherited from Any

Ungrouped