fluent-logger 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/linux.yml +30 -0
- data/ChangeLog +4 -0
- data/README.md +4 -4
- data/fluent-logger.gemspec +1 -0
- data/lib/fluent/logger/fluent_logger.rb +2 -1
- data/lib/fluent/logger/version.rb +1 -1
- data/spec/fluent_logger_spec.rb +14 -0
- metadata +19 -17
- data/.travis.yml +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 460c4365ba58c7558db145e551b806ee8b2afb764454bfbba35e6f6290093317
|
4
|
+
data.tar.gz: 5166f31570a03e934c217464a2d16706f82bd650581f43d83ee87c53e0952da8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 443b59cb242dc22e0d7ec6e711aefc2274452b5ea19d04af73db8250683f27da15b731af24b137213d91ea1f9c91873e7c5b85302c461c3f312b5d19e4bed2b7
|
7
|
+
data.tar.gz: 3e1d99bb86d51e2e589621e73ad763de5928e19aa1a15d470fa7adc616a749674df69356b8bd431d07804a8f5925bcb8742c98a560e99f6ff35abf2f423c439e
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: linux
|
2
|
+
on:
|
3
|
+
- push
|
4
|
+
- pull_request
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ${{ matrix.os }}
|
8
|
+
strategy:
|
9
|
+
fail-fast: false
|
10
|
+
matrix:
|
11
|
+
ruby:
|
12
|
+
- '2.7'
|
13
|
+
- '3.0'
|
14
|
+
- '3.1'
|
15
|
+
- '3.2'
|
16
|
+
os:
|
17
|
+
- ubuntu-latest
|
18
|
+
name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v3
|
21
|
+
- uses: ruby/setup-ruby@v1
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
24
|
+
- name: unit testing
|
25
|
+
env:
|
26
|
+
CI: true
|
27
|
+
run: |
|
28
|
+
gem install bundler rake
|
29
|
+
bundle install --jobs 4 --retry 3
|
30
|
+
bundle exec rake spec
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Fluent logger
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://github.com/fluent/fluent-logger-ruby/actions/workflows/linux.yml/badge.svg?branch=master)](https://github.com/fluent/fluent-logger-ruby/actions/workflows/linux.yml)
|
4
4
|
|
5
5
|
A structured event logger
|
6
6
|
|
@@ -101,7 +101,7 @@ log = Fluent::Logger::FluentLogger.new(nil, :host => 'localhost', :port => 24224
|
|
101
101
|
```
|
102
102
|
<source>
|
103
103
|
@type forward
|
104
|
-
<transport
|
104
|
+
<transport tls>
|
105
105
|
version TLS1_2
|
106
106
|
ca_path /path/to/cacert.pem
|
107
107
|
cert_path /path/to/server-cert.pem
|
@@ -245,7 +245,7 @@ Fluent::Logger::NullLogger.open
|
|
245
245
|
|
246
246
|
To send events with nanosecond-precision time (Fluent 0.14 and up), specify `nanosecond_precision` to `FluentLogger` constructor.
|
247
247
|
|
248
|
-
```
|
248
|
+
```ruby
|
249
249
|
log = Fluent::Logger::FluentLogger.new(nil, :host => 'localhost', :port => 24224, :nanosecond_precision => true)
|
250
250
|
# Use nanosecond time instead
|
251
251
|
log.post("myapp.access", {"agent" => "foo"})
|
@@ -259,7 +259,7 @@ You can inject your own custom proc to handle buffer overflow in the event of co
|
|
259
259
|
Your proc must accept a single argument, which will be the internal buffer of messages from the logger. A typical use-case for this would be writing to disk or possibly writing to Redis.
|
260
260
|
|
261
261
|
##### Example
|
262
|
-
```
|
262
|
+
```ruby
|
263
263
|
class BufferOverflowHandler
|
264
264
|
attr_accessor :buffer
|
265
265
|
|
data/fluent-logger.gemspec
CHANGED
data/spec/fluent_logger_spec.rb
CHANGED
@@ -205,6 +205,10 @@ describe Fluent::Logger::FluentLogger do
|
|
205
205
|
expect(fluentd.queue.last).to be_nil
|
206
206
|
logger_io.rewind
|
207
207
|
logger_io.read =~ /FluentLogger: Can't convert to msgpack:/
|
208
|
+
|
209
|
+
logger.post('tag', { 'a' => 'b' })
|
210
|
+
fluentd.wait_transfer
|
211
|
+
expect(fluentd.queue.last).to eq ['logger-test.tag', { 'a' => 'b' }]
|
208
212
|
}
|
209
213
|
|
210
214
|
it ('should raise an error when second argument is non hash object') {
|
@@ -382,6 +386,16 @@ describe Fluent::Logger::FluentLogger do
|
|
382
386
|
|
383
387
|
before(:each) do
|
384
388
|
fluentd.startup(true)
|
389
|
+
# Make sure to wait TLS server since preparing it takes longer time than
|
390
|
+
# non-TLS so that it might be too early especially on CI environment
|
391
|
+
3.times do
|
392
|
+
begin
|
393
|
+
TCPSocket.open('localhost', fluentd.port) {}
|
394
|
+
break
|
395
|
+
rescue
|
396
|
+
fluentd.wait_transfer
|
397
|
+
end
|
398
|
+
end
|
385
399
|
end
|
386
400
|
|
387
401
|
after(:each) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -100,6 +100,20 @@ dependencies:
|
|
100
100
|
- - ">="
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 0.3.0
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: webrick
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
103
117
|
description: fluent logger for ruby
|
104
118
|
email: frsyuki@gmail.com
|
105
119
|
executables:
|
@@ -107,9 +121,9 @@ executables:
|
|
107
121
|
extensions: []
|
108
122
|
extra_rdoc_files: []
|
109
123
|
files:
|
124
|
+
- ".github/workflows/linux.yml"
|
110
125
|
- ".gitignore"
|
111
126
|
- ".rspec"
|
112
|
-
- ".travis.yml"
|
113
127
|
- AUTHORS
|
114
128
|
- COPYING
|
115
129
|
- ChangeLog
|
@@ -161,20 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
175
|
- !ruby/object:Gem::Version
|
162
176
|
version: '0'
|
163
177
|
requirements: []
|
164
|
-
rubygems_version: 3.1
|
178
|
+
rubygems_version: 3.4.1
|
165
179
|
signing_key:
|
166
180
|
specification_version: 4
|
167
181
|
summary: fluent logger for ruby
|
168
|
-
test_files:
|
169
|
-
- spec/console_logger_spec.rb
|
170
|
-
- spec/fluent_logger_spec.rb
|
171
|
-
- spec/level_fluent_logger_spec.rb
|
172
|
-
- spec/logger_base_spec.rb
|
173
|
-
- spec/logger_spec.rb
|
174
|
-
- spec/null_logger_spec.rb
|
175
|
-
- spec/plugin/out_test.rb
|
176
|
-
- spec/spec_helper.rb
|
177
|
-
- spec/support/dummy_fluentd.rb
|
178
|
-
- spec/support/dummy_serverengine.rb
|
179
|
-
- spec/support/timecop.rb
|
180
|
-
- spec/test_logger_spec.rb
|
182
|
+
test_files: []
|
data/.travis.yml
DELETED