rack-ougai 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.tool-versions +1 -0
- data/Gemfile +1 -1
- data/README.md +28 -16
- data/Rakefile +2 -1
- data/lib/rack/ougai/{attach_requestid.rb → attach_request_id.rb} +0 -2
- data/lib/rack/ougai/version.rb +1 -1
- data/lib/rack/ougai.rb +1 -1
- data/rack-ougai.gemspec +6 -5
- metadata +17 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e827d82e3bda428311a488e71e7a68407ebd6f9664fd4d93964696182ba884f
|
4
|
+
data.tar.gz: 60551ccad80cdf385be7f3f8a684f614f7b4ab5573bf28a56b5caa84e49e0cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 185c799a6a849b667d81d05818e5682c88fad6af4bb9a4d19cc3af6098573407a3588afe4d3159c17ab50f67ca91fcf62c7fd92054f6dcc8fe4dbdbaefabe0c9
|
7
|
+
data.tar.gz: 4443c2d0fc41196a02b037152642ba46ec137d852662d397f7207d38df42366710b31afacbdc3952267c1c392b46a5f8ade8f21f184cf88fe521e19e0f7bdfaf
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.0.1
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
# Rack::Ougai
|
1
|
+
# Rack::Ougai
|
2
|
+
|
2
3
|
`Rack::Ougai` replaces the Rack logging system with an [Ougai](https://github.com/tilfin/ougai) logger
|
3
4
|
that supports Bunyan-styled structured logging in JSON. It includes a few options for building those logs,
|
4
|
-
as well as integration with
|
5
|
+
as well as integration with [`Rack::RequestID`](https://github.com/dancavallaro/rack-requestid).
|
6
|
+
|
7
|
+
## Installation
|
5
8
|
|
6
|
-
## Installation ##
|
7
9
|
Add this line to your application's Gemfile:
|
8
10
|
|
9
11
|
```ruby
|
@@ -12,18 +14,23 @@ gem 'rack-ougai'
|
|
12
14
|
|
13
15
|
And then execute:
|
14
16
|
|
15
|
-
|
17
|
+
```sh
|
18
|
+
bundle
|
19
|
+
```
|
16
20
|
|
17
21
|
Or install it yourself as:
|
18
22
|
|
19
|
-
|
23
|
+
```sh
|
24
|
+
gem install rack-ougai
|
25
|
+
```
|
26
|
+
|
27
|
+
## Usage
|
20
28
|
|
21
|
-
## Usage ##
|
22
29
|
Your `config.ru` should include directives similar to these. Obviously, `Rack::RequestID` is
|
23
30
|
optional, but `Rack::Ougai::Logger` (or another logger provider) should be high in your middleware
|
24
31
|
stack so as to push a logger down into the subsequent middleware.
|
25
32
|
|
26
|
-
```
|
33
|
+
```ruby
|
27
34
|
require 'rack/ougai'
|
28
35
|
require 'rack/requestid'
|
29
36
|
|
@@ -35,27 +42,32 @@ use Rack::Ougai::AttachRequestID # Replaces logger with a child logger that's ta
|
|
35
42
|
use Rack::Ougai::LogRequests # logs every request with timing data, request result, etc.
|
36
43
|
```
|
37
44
|
|
38
|
-
## Log Providers
|
45
|
+
## Log Providers
|
46
|
+
|
47
|
+
### `Rack::Ougai::Logger`
|
39
48
|
|
40
|
-
### `Rack::Ougai::Logger` ###
|
41
49
|
Simple, no-configuration Ougai logger that accepts a `Logger` severity level.
|
42
50
|
|
43
|
-
### `Rack::Ougai::ConstantLogger`
|
51
|
+
### `Rack::Ougai::ConstantLogger`
|
52
|
+
|
44
53
|
Specify a preconfigured logger to be used for all requests. For example, in one project I
|
45
54
|
build a global logger, separate from Rack, which is configured via a YAML file; I add it as the
|
46
55
|
top level logger in Rack, too.
|
47
56
|
|
48
|
-
```
|
57
|
+
```ruby
|
49
58
|
require 'myproject/log'
|
50
59
|
|
51
60
|
use Rack::Ougai::ConstantLogger, MyProject::Log # an instance of Ougai::Logging
|
52
61
|
```
|
53
62
|
|
54
|
-
## Contributing
|
55
|
-
|
63
|
+
## Contributing
|
64
|
+
|
65
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/eropple/rack-ougai. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
66
|
+
|
67
|
+
## License
|
56
68
|
|
57
|
-
## License ##
|
58
69
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
59
70
|
|
60
|
-
## Code of Conduct
|
61
|
-
|
71
|
+
## Code of Conduct
|
72
|
+
|
73
|
+
Everyone interacting in the Rack::Ougai project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/eropple/rack-ougai/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
data/lib/rack/ougai/version.rb
CHANGED
data/lib/rack/ougai.rb
CHANGED
data/rack-ougai.gemspec
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
lib = File.expand_path("../lib", __FILE__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
3
4
|
require "rack/ougai/version"
|
4
5
|
|
5
6
|
Gem::Specification.new do |spec|
|
6
7
|
spec.name = "rack-ougai"
|
7
8
|
spec.version = Rack::Ougai::VERSION
|
8
|
-
spec.authors = ["Toshimitsu Takahashi", "Ed Ropple"]
|
9
|
-
spec.email = ["toshi@tilfin.com", "ed@edropple.com"]
|
9
|
+
spec.authors = ["Toshimitsu Takahashi", "Ed Ropple", "Pablo Crivella"]
|
10
|
+
spec.email = ["toshi@tilfin.com", "ed@edropple.com", "pablocrivella@gmail.com"]
|
10
11
|
|
11
12
|
spec.summary = "Rack integration for the Ougai logger."
|
12
13
|
spec.homepage = "https://github.com/eropple/rack-ougai"
|
@@ -19,9 +20,9 @@ Gem::Specification.new do |spec|
|
|
19
20
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
21
|
spec.require_paths = ["lib"]
|
21
22
|
|
22
|
-
spec.add_development_dependency "bundler", "~>
|
23
|
-
spec.add_development_dependency "rake", "~>
|
23
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
24
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
24
25
|
|
25
26
|
spec.add_runtime_dependency "rack", "~> 2.0"
|
26
|
-
spec.add_runtime_dependency "ougai", "~>
|
27
|
+
spec.add_runtime_dependency "ougai", "~> 2.0"
|
27
28
|
end
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-ougai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshimitsu Takahashi
|
8
8
|
- Ed Ropple
|
9
|
-
|
9
|
+
- Pablo Crivella
|
10
|
+
autorequire:
|
10
11
|
bindir: exe
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bundler
|
@@ -17,28 +18,28 @@ dependencies:
|
|
17
18
|
requirements:
|
18
19
|
- - "~>"
|
19
20
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
21
|
+
version: '2.0'
|
21
22
|
type: :development
|
22
23
|
prerelease: false
|
23
24
|
version_requirements: !ruby/object:Gem::Requirement
|
24
25
|
requirements:
|
25
26
|
- - "~>"
|
26
27
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
28
|
+
version: '2.0'
|
28
29
|
- !ruby/object:Gem::Dependency
|
29
30
|
name: rake
|
30
31
|
requirement: !ruby/object:Gem::Requirement
|
31
32
|
requirements:
|
32
33
|
- - "~>"
|
33
34
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
35
|
+
version: '12.0'
|
35
36
|
type: :development
|
36
37
|
prerelease: false
|
37
38
|
version_requirements: !ruby/object:Gem::Requirement
|
38
39
|
requirements:
|
39
40
|
- - "~>"
|
40
41
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
42
|
+
version: '12.0'
|
42
43
|
- !ruby/object:Gem::Dependency
|
43
44
|
name: rack
|
44
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,24 +60,26 @@ dependencies:
|
|
59
60
|
requirements:
|
60
61
|
- - "~>"
|
61
62
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
63
|
+
version: '2.0'
|
63
64
|
type: :runtime
|
64
65
|
prerelease: false
|
65
66
|
version_requirements: !ruby/object:Gem::Requirement
|
66
67
|
requirements:
|
67
68
|
- - "~>"
|
68
69
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
70
|
-
description:
|
70
|
+
version: '2.0'
|
71
|
+
description:
|
71
72
|
email:
|
72
73
|
- toshi@tilfin.com
|
73
74
|
- ed@edropple.com
|
75
|
+
- pablocrivella@gmail.com
|
74
76
|
executables: []
|
75
77
|
extensions: []
|
76
78
|
extra_rdoc_files: []
|
77
79
|
files:
|
78
80
|
- ".gitignore"
|
79
81
|
- ".rubocop.yml"
|
82
|
+
- ".tool-versions"
|
80
83
|
- CODE_OF_CONDUCT.md
|
81
84
|
- Gemfile
|
82
85
|
- LICENSE.txt
|
@@ -85,7 +88,7 @@ files:
|
|
85
88
|
- bin/console
|
86
89
|
- bin/setup
|
87
90
|
- lib/rack/ougai.rb
|
88
|
-
- lib/rack/ougai/
|
91
|
+
- lib/rack/ougai/attach_request_id.rb
|
89
92
|
- lib/rack/ougai/constant_logger.rb
|
90
93
|
- lib/rack/ougai/log_requests.rb
|
91
94
|
- lib/rack/ougai/logger.rb
|
@@ -95,7 +98,7 @@ homepage: https://github.com/eropple/rack-ougai
|
|
95
98
|
licenses:
|
96
99
|
- MIT
|
97
100
|
metadata: {}
|
98
|
-
post_install_message:
|
101
|
+
post_install_message:
|
99
102
|
rdoc_options: []
|
100
103
|
require_paths:
|
101
104
|
- lib
|
@@ -110,9 +113,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
113
|
- !ruby/object:Gem::Version
|
111
114
|
version: '0'
|
112
115
|
requirements: []
|
113
|
-
|
114
|
-
|
115
|
-
signing_key:
|
116
|
+
rubygems_version: 3.2.15
|
117
|
+
signing_key:
|
116
118
|
specification_version: 4
|
117
119
|
summary: Rack integration for the Ougai logger.
|
118
120
|
test_files: []
|