1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

446 Commits

Author SHA1 Message Date
ff0fd930eb appveyor.yml 2019-09-25 16:25:16 +02:00
e3baeb377e Skip file rename tests on Windows on older Ruby versions
Since these platforms don't support the File::SHARE_DELETE flag on
files, Windows rejects any attempts to delete or rename a file opened
by us. There's nothing we can do here unfortunately...
2019-09-25 16:25:16 +02:00
8943e18aca Correctly parse opaque URLs for the File adapter 2019-09-25 16:25:16 +02:00
6831e3db55 Allow to acquire an exclusive lock on the logfile for each write to a file
This is required on Windows (where we enable this feature by default)
since they don't support concurrent atomic writes above the drive's
sector size (usually between 512 Bytes and 4 KiBytes). Without an
explicit lock, concurrent writes can be interleaved or be partially
lost.
2019-09-25 16:25:16 +02:00
0907a85e81 Use a Concurrent::CyclicBarrier instead of file locking for concurrent file adapter tests 2019-09-25 16:25:15 +02:00
f304f04ded Always run concurrency tests for File adapter with threads
Since fork is not available on some platforms (aka. Windows), we
avoid it and use normal Threads instead. We have fail saves in place to
ensure that tests are still valid even on MRI with its GIL.
2019-09-17 22:26:07 +02:00
c79f2e45d3 Close a tempfile before attemting to rename it in File specs
This is required on Windows which stubornly refused to rename opened
files by default.
2019-09-17 22:26:07 +02:00
68d674668a Explicitly remove temporary files in specs 2019-09-17 22:26:07 +02:00
9ae14f068d Add appveyor.yml to define tests on Appveyor 2019-09-17 22:26:07 +02:00
0f8bdd0be0 Open output files with File::SHARE_DELETE to allow logrotates on Windows 2019-09-17 19:02:30 +02:00
13df9ae70b Bump Truffleruby to 19.0.0 2019-06-17 11:40:52 +02:00
b610a21571 Bump truffleruby to 1.0.0-rc16 in .travis.yml 2019-04-24 14:43:28 +02:00
f92f61ccfe Bump Ruby versions in .travis.yml 2019-04-01 15:08:48 +02:00
959e95afb1 Bump Ruby 2.5 in .travis.yml 2019-03-18 12:45:06 +01:00
3aca853928 Bump Ruby 2.5, 2.6 in .travis.yml 2019-03-14 12:08:19 +01:00
512b3e692a Update TruffleRuby to 1.0.0-rc12 on Travis CI 2019-02-04 22:25:58 +01:00
40c97ffbbf Update Ruby 2.6 to 2.6.1 on Travis CI 2019-02-04 22:11:37 +01:00
b6be188dbd Use Logger#capture instead of with_buffer as a more intention revealing name 2019-01-14 11:51:05 +01:00
8788c3a75e Explicitly install Bundler < 2.0 for older Ruby versions on Travis CI 2019-01-11 12:12:33 +01:00
d53679cb83 Enforce less restrictive version requirements for rake and bundler
With the release of Bundler 2.0, things got a bit messy. Since both
bundler and rake are very likely to retain backwards compatibility due
to their wide use in the wild, this is likely safe enough.

In any case, these are "only" development dependencies which do not
affect any production users of Rackstash but merely people running the
tests.
2019-01-11 11:06:24 +01:00
7695070a2f Update copyright in .travis.yml 2019-01-11 11:04:11 +01:00
4afafd68ae Promote truffleruby to a fully supported Ruby version 2019-01-11 11:01:34 +01:00
7a6f8fbb69 Bump Ruby versions in .travis.yml 2019-01-11 10:59:18 +01:00
26a1ce0a68 Log the original event to the error_flow if Flow#write raises an error 2018-12-05 18:54:27 +01:00
0967593010 Perform actions on flows asynchronously by default
Each flow now has an associated executor which performs all actions
(writing events, closing, reopening) asynchronously by default using a
Concurrent::SingleThreadExecutor.

This improves the responsiveness of the application by performing the
(usually) IO-bound task of writing the logs to a background thread.

By creating a flow with `synchronous: true`, all actions are run in the
calling thread as before, making the flow blocking.
2018-12-05 18:51:29 +01:00
009d0c3cdd Bump Ruby versions in .travis.yml 2018-11-01 18:28:46 +01:00
4409529f18 Test truffleruby support on Travis CI 2018-11-01 18:23:43 +01:00
2d5fe79d7a Automatically require the Select filter class 2018-08-28 10:36:19 +02:00
8a19dea76c Rename the DropIf filter to Drop and allow it to drop a percentage of events
With this, we also drop the ability to define conditions in the filter
itself. When adding a filter, users can still setup a condition using
the common functionality of all filters.
2018-08-28 10:33:20 +02:00
9152b67df0 Allow to pass initializer arguments to the encoder of a flow 2018-07-18 12:47:55 +02:00
9604ebf484 Correctly describe the encoder build process in the docs for Encoder.build 2018-07-18 12:47:55 +02:00
ba0aef3283 Fix typo in Filter.build documentation 2018-07-18 12:43:30 +02:00
a3f16b42cd Add attribute reader for tagged fields to Encoder::Message 2018-07-18 12:33:10 +02:00
fa15b9fb8a Typos 2018-07-17 23:28:26 +02:00
b646ef9ef1 Add Rack::Errors#close to satisfy the expected protocol for a logdev of Ruby's core Logger 2018-07-17 22:53:54 +02:00
78f3e037e7 Add method reference to docs for Message#initialize 2018-07-17 22:51:30 +02:00
f97bcf2334 Add Flow#raise_on_error! as a convenience method 2018-07-17 22:49:32 +02:00
e592434eec Do not mention local methods of Buffer class in methods docs referenced by Logger 2018-07-17 22:46:15 +02:00
d510280532 Preserve existing field mappings for encoder fields 2018-07-17 21:39:37 +02:00
3167574607 Correctly name the GELF full_message field (omitted by default) 2018-07-17 19:00:51 +02:00
3ef0d56c2d Bug: Allow Flows#auto_flush if there are only auto_flushing flows 2018-07-12 18:20:34 +02:00
2c7d897889 Allow to set a registered encoder in a Flow by name 2018-07-12 18:02:09 +02:00
fa1abb5ab5 Define UndefinedClass as an actual Singleton
This takes care of edge-cases and ensures that multiple loads of
`lib/rackstash.rb` do not fail on an attempted second initialization of
the UndefinedClass.
2018-06-21 13:56:50 +02:00
a807f99af5 Interpret a Date in the Gelf timestamp field as UTC midnight 2018-06-15 00:12:51 +02:00
a70b859a53 Update copyright 2018-06-14 23:57:14 +02:00
916cabd43d Add Gelf encoder to create logs in the Graylog Extended Log Format 2018-06-14 23:54:36 +02:00
fcb1043b6f Correctly format date and time objects in Lograge encoder 2018-06-14 23:51:40 +02:00
bb4d8e10bb Clearify buffering behavior on Rackstash::Buffer 2018-06-13 22:51:06 +02:00
5e9c76d6df Allow to rotate log files using a date-based pattern
We now support two different modes of file rotation at the same time:

* auto_reopen can be used to automatically reopen a logfile at the
  original location if the file was moved or deleted from the filesystem
* rotate can be used to write to a rotate file which can be reopened /
  created based on Date pattern.

The user can now decide whether they want to use an external logrotate
command or use internal rotation with Rackstash instead.
2018-06-13 22:33:47 +02:00
7713bdfdb6 Allow to customize the final newline character when writing to an adapter 2018-05-31 20:12:59 +02:00