object DefaultDispatcher extends Dispatcher
Provides a default dispatcher to be used by any timber API loggers in the system that didn't specify another dispatcher. It delegates all of the dispatching work to another dispatcher which can be specified using a system property or changed at runtime.
By default, the delegate created by this object is an instance of org.scalawag.timber.backend.dispatcher.Dispatcher. This should be appropriate for most situations. In the event that you need a different type of dispatcher, there are two ways that you can determine the delegate.
-
If the timber.dispatcher.class system property contains the name of a class with a default constructor
that extends the Dispatcher trait, the initial delegate will be a newly-created instance of that class.
- During your process bootstrap, you can use the set(Dispatcher) method to change the delegate. In this case, a default constructor is not required, since you instantiate the object yourself. It's not essential that this call be made prior to any logging calls, but only entries that are dispatched after the call will use the new dispatcher that you put in place. There may be some leakage on stderr (where the default initial dispatcher writes its entries) if you don't get your dispatcher in place soon enough.
- Alphabetic
- By Inheritance
- DefaultDispatcher
- Dispatcher
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def dispatch(entry: Entry): Unit
- Definition Classes
- DefaultDispatcher → Dispatcher
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def set(delegate: Dispatcher): Unit
Sets a new delegate for all the dispatch calls received by this dispatcher.
Sets a new delegate for all the dispatch calls received by this dispatcher. This call is thread-safe and can be called any number of times during the process' lifetime. The normal use case is for it to be set once during the process bootstrap, before other logging calls are made.
- delegate
the dispatcher which should handle all entries for timber loggers not specifying another dispatcher
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()