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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbc2c1df2c8703af85a48cec027481b51e963a7d
4
- data.tar.gz: 81e5b8afc0c7bf47a65e68b2682ceb3f764b56c1
3
+ metadata.gz: 17260ebae7ab260f967e12b4ccbc3a0759198c48
4
+ data.tar.gz: b9d0b278cecffc630df5c3799534212a299947b5
5
5
  SHA512:
6
- metadata.gz: 35ac2f6b11c4adb23ebf976bef30c6e3bdd59da23ecf62e93a1ebc74d8a49378e2bc87ec9725622c8518b1f0da75d080080604d8993fd9adef065f7dd440d43d
7
- data.tar.gz: bb92378034091e09808ad93a4e549102a2173330bdd8eaf372eee3b93b6f6fe79e6b883479b481bee0fd7f245a46a8ccc055ab7786562d1d26bc6bb46ad84108
6
+ metadata.gz: fae482314860b620502fbf5e122cc08cf06cd75395feed1686dfa6730226077960e08a3a0a6395acd76e5bbff50b0c37315b1cc1c82da38fab20121b0ff57f3e
7
+ data.tar.gz: f9b6740e461e66035880ce0072d6427db6120c91bf6a3662707989a3bfda872b2a1dbae0659b00b5f6877fbc0b4b77e6afc557451a837b1963c121646b337013
data/README.md CHANGED
@@ -92,7 +92,7 @@ Loga.logger.info('Hello World')
92
92
  "level": 6,
93
93
  "_service.name": "marketplace",
94
94
  "_service.version": "v1.0.0",
95
- "_tags": []
95
+ "_tags": ""
96
96
  }
97
97
  ```
98
98
 
data/circle.yml CHANGED
@@ -1,15 +1,15 @@
1
1
  dependencies:
2
2
  override:
3
- - rvm-exec 2.0.0-p353 bundle install -j 4
4
- - rvm-exec 2.0.0-p353 bundle exec appraisal install -j 4
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.0.0-p353 bundle exec appraisal rspec
10
- - RACK_ENV=production rvm-exec 2.0.0-p353 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
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:
@@ -97,7 +97,7 @@ module Loga
97
97
  name: @service_name,
98
98
  version: @service_version,
99
99
  },
100
- tags: current_tags,
100
+ tags: current_tags.join(' '),
101
101
  }
102
102
  end
103
103
  end
data/lib/loga/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Loga
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
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
- spec.add_dependency 'activesupport', '>= 2.3.8'
21
- spec.add_dependency 'rack'
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' => ['471a34dc'],
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' => ['471a34dc'],
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' => ['471a34dc'],
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' => ['471a34dc'],
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' => ['471a34dc'],
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: loga
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Funding Circle