loga 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/circle.yml +6 -6
- data/lib/loga/formatter.rb +1 -1
- data/lib/loga/version.rb +1 -1
- data/loga.gemspec +7 -2
- data/spec/fixtures/rails32/config/application.rb +1 -1
- data/spec/fixtures/rails40/config/application.rb +1 -1
- data/spec/integration/sinatra_spec.rb +1 -1
- data/spec/support/request_spec.rb +5 -5
- data/spec/unit/loga/formatter_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17260ebae7ab260f967e12b4ccbc3a0759198c48
|
4
|
+
data.tar.gz: b9d0b278cecffc630df5c3799534212a299947b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fae482314860b620502fbf5e122cc08cf06cd75395feed1686dfa6730226077960e08a3a0a6395acd76e5bbff50b0c37315b1cc1c82da38fab20121b0ff57f3e
|
7
|
+
data.tar.gz: f9b6740e461e66035880ce0072d6427db6120c91bf6a3662707989a3bfda872b2a1dbae0659b00b5f6877fbc0b4b77e6afc557451a837b1963c121646b337013
|
data/README.md
CHANGED
data/circle.yml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
dependencies:
|
2
2
|
override:
|
3
|
-
- rvm-exec 2.
|
4
|
-
- rvm-exec 2.
|
3
|
+
- rvm-exec 2.1.0 bundle install -j 4
|
4
|
+
- rvm-exec 2.1.0 bundle exec appraisal install -j 4
|
5
5
|
- rvm-exec 2.2.2 bundle install -j 4
|
6
6
|
- rvm-exec 2.2.2 bundle exec appraisal install -j 4
|
7
7
|
test:
|
8
8
|
override:
|
9
|
-
- RACK_ENV=development rvm-exec 2.
|
10
|
-
- RACK_ENV=production rvm-exec 2.
|
11
|
-
- RACK_ENV=development rvm-exec 2.2.2
|
12
|
-
- RACK_ENV=production rvm-exec 2.2.2
|
9
|
+
- RACK_ENV=development rvm-exec 2.1.0 bundle exec appraisal rspec
|
10
|
+
- RACK_ENV=production rvm-exec 2.1.0 bundle exec appraisal rspec
|
11
|
+
- RACK_ENV=development rvm-exec 2.2.2 bundle exec appraisal rspec
|
12
|
+
- RACK_ENV=production rvm-exec 2.2.2 bundle exec appraisal rspec
|
13
13
|
- rvm-exec 2.2.2 bundle exec rubocop
|
14
14
|
deployment:
|
15
15
|
gemfury:
|
data/lib/loga/formatter.rb
CHANGED
data/lib/loga/version.rb
CHANGED
data/loga.gemspec
CHANGED
@@ -17,8 +17,13 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(/^(test|spec|features)/)
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
|
21
|
-
|
20
|
+
if RUBY_VERSION < '2.2'
|
21
|
+
spec.add_dependency 'activesupport', '>= 2.3.8', '< 5.0'
|
22
|
+
spec.add_dependency 'rack', '< 2.0'
|
23
|
+
else
|
24
|
+
spec.add_dependency 'activesupport', '>= 2.3.8'
|
25
|
+
spec.add_dependency 'rack'
|
26
|
+
end
|
22
27
|
|
23
28
|
spec.add_development_dependency 'appraisal', '~> 2.0.2'
|
24
29
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
@@ -60,7 +60,7 @@ module Rails32
|
|
60
60
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
61
61
|
# parameters by using an attr_accessible or attr_protected declaration.
|
62
62
|
# config.active_record.whitelist_attributes = true
|
63
|
-
config.log_tags = [:uuid]
|
63
|
+
config.log_tags = [ :uuid, 'TEST_TAG' ]
|
64
64
|
config.loga.configure do |loga|
|
65
65
|
loga.service_name = 'hello_world_app'
|
66
66
|
loga.service_version = '1.0'
|
@@ -26,7 +26,7 @@ module Rails40
|
|
26
26
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
27
27
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
28
28
|
# config.i18n.default_locale = :de
|
29
|
-
config.log_tags = [:uuid]
|
29
|
+
config.log_tags = [ :uuid, 'TEST_TAG' ]
|
30
30
|
config.loga.configure do |loga|
|
31
31
|
loga.service_name = 'hello_world_app'
|
32
32
|
loga.service_version = '1.0'
|
@@ -24,7 +24,7 @@ describe 'Rack request logger with Sinatra', timecop: true do
|
|
24
24
|
set :show_exceptions, false
|
25
25
|
|
26
26
|
use Loga::Rack::RequestId
|
27
|
-
use Loga::Rack::Logger, Loga.logger, [:uuid]
|
27
|
+
use Loga::Rack::Logger, Loga.logger, [:uuid, 'TEST_TAG']
|
28
28
|
|
29
29
|
error do
|
30
30
|
status 500
|
@@ -22,7 +22,7 @@ RSpec.shared_examples 'request logger' do
|
|
22
22
|
'_request.status' => 200,
|
23
23
|
'_request.request_id' => '471a34dc',
|
24
24
|
'_request.duration' => 0,
|
25
|
-
'_tags' =>
|
25
|
+
'_tags' => '471a34dc TEST_TAG',
|
26
26
|
)
|
27
27
|
end
|
28
28
|
end
|
@@ -52,7 +52,7 @@ RSpec.shared_examples 'request logger' do
|
|
52
52
|
'_request.status' => 200,
|
53
53
|
'_request.request_id' => '471a34dc',
|
54
54
|
'_request.duration' => 0,
|
55
|
-
'_tags' =>
|
55
|
+
'_tags' => '471a34dc TEST_TAG',
|
56
56
|
)
|
57
57
|
end
|
58
58
|
|
@@ -83,7 +83,7 @@ RSpec.shared_examples 'request logger' do
|
|
83
83
|
'_request.status' => 302,
|
84
84
|
'_request.request_id' => '471a34dc',
|
85
85
|
'_request.duration' => 0,
|
86
|
-
'_tags' =>
|
86
|
+
'_tags' => '471a34dc TEST_TAG',
|
87
87
|
)
|
88
88
|
end
|
89
89
|
end
|
@@ -114,7 +114,7 @@ RSpec.shared_examples 'request logger' do
|
|
114
114
|
'_exception.klass' => 'NoMethodError',
|
115
115
|
'_exception.message' => "undefined method `name' for nil:NilClass",
|
116
116
|
'_exception.backtrace' => be_a(String),
|
117
|
-
'_tags' =>
|
117
|
+
'_tags' => '471a34dc TEST_TAG',
|
118
118
|
)
|
119
119
|
end
|
120
120
|
end
|
@@ -140,7 +140,7 @@ RSpec.shared_examples 'request logger' do
|
|
140
140
|
'_request.status' => 404,
|
141
141
|
'_request.request_id' => '471a34dc',
|
142
142
|
'_request.duration' => 0,
|
143
|
-
'_tags' =>
|
143
|
+
'_tags' => '471a34dc TEST_TAG',
|
144
144
|
)
|
145
145
|
end
|
146
146
|
end
|
@@ -26,7 +26,7 @@ describe Loga::Formatter do
|
|
26
26
|
it 'includes Loga additional fields' do
|
27
27
|
expect(json).to include('_service.name' => service_name,
|
28
28
|
'_service.version' => service_version,
|
29
|
-
'_tags' =>
|
29
|
+
'_tags' => '')
|
30
30
|
end
|
31
31
|
|
32
32
|
it 'outputs the timestamp in seconds since UNIX epoch' do
|