1
0
mirror of https://github.com/meineerde/rackstash.git synced 2026-03-10 19:13:05 +00:00

9 Commits

Author SHA1 Message Date
99728842aa Pass the raw messages array in the event Hash to the encoder
The encoder is then responsible to format it as it pleases. Commonly,
encoders can use Rackstash::Encoders::Helpers::Message#normalize_message
to create a single combined message string.

If the encoder is not interested in using the message, it can jsut get
rid if it without incuring any overhead.
2017-08-22 00:02:10 +02:00
168e62b63c Remove useless newlines 2017-08-12 14:02:03 +02:00
d362b7efaa Make Flow#unshift_filter the primary alias before filter_prepend to be more consistent 2017-08-05 23:29:54 +02:00
581b8b1819 Allow to insert a new filter defined by a symbol or String into a FilterChain 2017-08-05 23:29:54 +02:00
c4f0b9cdeb Use an error_flow to log any exceptions during logging
During normal operation, the Flows will rescue all exceptions and log
them to the special error_flow. By default, we will write JSON logs to
STDERR.

The log location and format can either be change globally by setting (or
changing) the Rackstash.error_flow or for each Flow for a Logger
individually by setting Flow#error_flow.
2017-07-28 02:16:31 +02:00
fb7732ef42 Extract close!, reopen!, and write! methods from Rackstash::Flow
These methods do not rescue any thrown errors. The usual loggers will
always want to use the non-bang methods which rescue errors and attempt
to log them.
2017-07-27 23:15:59 +02:00
54a6f5d160 Implement the Flow to transform and persist log events
A single Buffer can be send to one or more flows which in turn each
write to a different adapter. A Flow object is responsible for
filtering, encoding, and finally persisting the event to an adapter.

Each Flow object can be configured differently which allows to write a
single log event to multiple targets as required.
2017-07-19 23:55:52 +02:00
a4a6b248cf Use frozen string literals throughout the codebase in Ruby >= 2.3 2017-07-17 13:35:24 +02:00
b2c1a1da0e Rename Target(List) to Flow(s)
Since a flow will significantly affect the representation of a log event
over its life before being persistet by the final adapter, the new term
better reflects what it is responsible for.

It also helps to avoid the dupliction of meaning between Sink, Target,
Adapter.
2017-05-06 14:47:40 +02:00