package backend
- Alphabetic
- Public
- Protected
Package Members
- package dispatcher
- package receiver
Contains all of the built-in support for receivers, which are the leaves of dispatcher routing graphs.
Contains all of the built-in support for receivers, which are the leaves of dispatcher routing graphs. Receivers do something with entries. Exactly what they do depends on the implementation.
Value Members
- 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.
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.classsystem 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.