-
Notifications
You must be signed in to change notification settings - Fork 2
2 Key Features
Table of contents generated with markdown-toc
Bobbin
compiles its configuration into a Java class during start-up.
Therefore there is no need to perform run-time message format syntax evaluation like in other loggers.
Furthermore, due to its minimalism, Bobbin
has only few classes and methods, which helps to control and optimize performance.
In the most simple scenario Bobbin
does not need any configuration - using a pre-defined zero
configuration.
However the power of Bobbin
is within Bobbin.yml
- a scalable and simple YAML
configuration file.
Bobbin.yml
allows to redefine configuration on a root logger, as well as on individual destinations:
- Levels
- Packages
- Class Names
- Destinations
- Message formats
- File name
- Optional filter expression
Take a look at the samples.
In Object-oriented terms, existing logging frameworks consider log messages as events belonging to the same hierarchy:
- Trace
- Debug extends Trace
- Info extends Debug
- Warning extends Info
- Error extends Warning
This happens due to comparable nature of conventional Log Levels: e.g. Trace
< Debug
< Info
< Warning
< Error
.
This is a traditional paradigm which is so old that it is just taken as granted.
We change this paradigm.
Bobbin
considers log messages as independent events with different types (as per their level).
With Bobbin
it is possible to enable logging levels in a granular way without filter, using array:
levels: [warn, error, info]
A conventional thinking: a logger is assigned to one and only one class name or package name.
The Bobbin thinking: a logger can have multiple classes and package names attached to it.
packages: [io.infinite, com.google]
Bobbin
supports Java
and Groovy
syntax in its configuration:
- File names
- Message formats
- Optional filter expression
- Date and time formats
Here is an example of message format configuration:
format: dateTime + delimiter + MDC.get("instanceUUID") + delimiter + level + delimiter + threadName + delimiter + className + delimiter + message