package receiver
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.
- Alphabetic
- By Inheritance
- receiver
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package buffering
Contains the composable Receiver buffering policies available in timber.
Contains the composable Receiver buffering policies available in timber. These only affect how often the receiver is flushed by timber. Many receivers will be based on instances of other classes that are themselves buffered (e.g., BufferedWriters and BufferedOutputStreams). While the flushes that timber instigates should make it down to the underlying objects, those objects may also flush for other reasons (e.g., their buffer reaching capacity). So, this buffering policy may not be the only source of flushes.
Each of the policies has two flavors. The first is a trait that can be used to mixin to a StackableReceiver. The second is an object that can be used as an argument to the
file()method in the DSL. - package concurrency
Contains the composable Receiver concurrency policies available in timber.
Contains the composable Receiver concurrency policies available in timber. These determine whether concurrent access to the various Receiver methods is allowed.
Each of the policies has two flavors. The first is a trait that can be used to mixin to a StackableReceiver. The second is an object that can be used as an argument to the
file()method in the DSL. - package formatter
Contains functionality for turning log entries into text.
Type Members
- class ConsoleErrReceiver extends ConsoleReceiver
A Receiver that formats entries and writes them to scala's Console.err (which normally points to stderr but can be redirected).
- class ConsoleOutReceiver extends ConsoleReceiver
A Receiver that formats entries and writes them to scala's Console.out (which normally points to stdout but can be redirected).
- class DelegatingReceiver extends Receiver
A Receiver that delegates all calls to another Receiver, specified at construction.
- trait Receiver extends AnyRef
Marks a class that is capable of receiving entries and doing something interesting with them.
Marks a class that is capable of receiving entries and doing something interesting with them. What exactly it does is up to the implementation, but common behaviors are writing to a local log file or sending to a log aggregation service.
- class WriterBasedReceiver extends Receiver
Implements a Receiver that formats entries with an EntryFormatter and then writes them to a Writer.
Implements a Receiver that formats entries with an EntryFormatter and then writes them to a Writer. The Writer is specified using a writer creation function so that this receiver can recreate the Writer as many times as it needs to. This may happen if
close()is called before the last timereceive(Entry)is called. Whenreceive(Entry)is called afterclose(), the function is used to recreate the Writer. This functionality is used to support logrotate integration (or other utilities that would need a log file to be reopened). - class WriterBasedStackableReceiver extends WriterBasedReceiver
A stackable version of the WriterBasedReceiver.