betterlog 0.8.1 → 0.9.0

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
  SHA256:
3
- metadata.gz: 669ea0d62356d1741924aa51d8648fc8968cc32a910a9bcd96f88c90d91e494c
4
- data.tar.gz: db1a0fb6aea128b0bff226bb912c0d66f0ba40b8955a854a1c6f02fb22e798f9
3
+ metadata.gz: 35b30ba42034bf3d4a09a4558f8a21b8e48b2a5145b2e56299b4f73f9e14ebd4
4
+ data.tar.gz: 03df9bb690c3fedb95696fa1c0708a08da9ed5f41246233115fa6444b761a1f5
5
5
  SHA512:
6
- metadata.gz: a32f1c9ed9581edba4047bc14691a3a94653a553897b478361d012871ae2aa57843786642e41313c836f5fc5bf284153f5bc6bb49e734daf603d19d8cb70d37c
7
- data.tar.gz: 56e67e0133c821f0f945328c0d3ddcacbf42503d4b0d21b2e4d454b52291bf95737c38493840828d8ceb308a6c6b1d8ca53c0b8abd17eccf3684511104692520
6
+ metadata.gz: 4982f6fb3cd975ef1069a8b36617e5494f346084069d3d6eed723152e854bde651d76859cb4e33681889c22821b8be19626dcc1fa396a4bdd166373e5def483e
7
+ data.tar.gz: 109c8fd2ff8c4f9217188450793aeacf32a580f47c82eafec33e6abea77fa152028207f82a05fbab91142fd73eaf8a34a2493bd1d85e2e3e770434fce12acf27
data/Rakefile CHANGED
@@ -23,7 +23,7 @@ GemHadar do
23
23
  dependency 'file-tail', '~>1.0'
24
24
  dependency 'json', '~>2.0'
25
25
  dependency 'term-ansicolor', '~>1.3'
26
- dependency 'redis', '>=2.4'
26
+ dependency 'redis', '>=2.8'
27
27
  dependency 'redlock'
28
28
  dependency 'excon'
29
29
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.9.0
data/betterlog.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: betterlog 0.8.1 ruby lib
2
+ # stub: betterlog 0.9.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "betterlog".freeze
6
- s.version = "0.8.1"
6
+ s.version = "0.9.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["betterplace Developers".freeze]
11
- s.date = "2019-11-15"
11
+ s.date = "2020-01-17"
12
12
  s.description = "This library provides structure json logging for our rails projects".freeze
13
13
  s.email = "developers@betterplace.org".freeze
14
14
  s.executables = ["betterlog".freeze, "betterlog_pusher".freeze, "betterlog_sink".freeze]
@@ -16,42 +16,29 @@ Gem::Specification.new do |s|
16
16
  s.files = [".gitignore".freeze, ".travis.yml".freeze, "Dockerfile".freeze, "Gemfile".freeze, "LICENSE".freeze, "Makefile".freeze, "README.md".freeze, "Rakefile".freeze, "TODO.md".freeze, "VERSION".freeze, "betterlog.gemspec".freeze, "betterlog/config.go".freeze, "betterlog/healthz.go".freeze, "betterlog/redis_cert_cache.go".freeze, "bin/betterlog".freeze, "bin/betterlog_pusher".freeze, "bin/betterlog_sink".freeze, "cmd/betterlog-server/LICENSE".freeze, "cmd/betterlog-server/main.go".freeze, "config/log.yml".freeze, "go.mod".freeze, "go.sum".freeze, "lib/betterlog.rb".freeze, "lib/betterlog/global_metadata.rb".freeze, "lib/betterlog/log.rb".freeze, "lib/betterlog/log/event.rb".freeze, "lib/betterlog/log/event_formatter.rb".freeze, "lib/betterlog/log/severity.rb".freeze, "lib/betterlog/log_event_formatter.rb".freeze, "lib/betterlog/logger.rb".freeze, "lib/betterlog/notifiers.rb".freeze, "lib/betterlog/railtie.rb".freeze, "lib/betterlog/version.rb".freeze, "spec/betterlog/global_metadata_spec.rb".freeze, "spec/betterlog/log/event_spec.rb".freeze, "spec/betterlog/log/severity_spec.rb".freeze, "spec/betterlog/log_spec.rb".freeze, "spec/betterlog/logger_spec.rb".freeze, "spec/spec_helper.rb".freeze]
17
17
  s.homepage = "http://github.com/betterplace/betterlog".freeze
18
18
  s.rdoc_options = ["--title".freeze, "Betterlog".freeze, "--main".freeze, "README.md".freeze]
19
- s.rubygems_version = "3.0.6".freeze
19
+ s.rubygems_version = "3.1.2".freeze
20
20
  s.summary = "Structured logging support for bp".freeze
21
21
  s.test_files = ["spec/betterlog/global_metadata_spec.rb".freeze, "spec/betterlog/log/event_spec.rb".freeze, "spec/betterlog/log/severity_spec.rb".freeze, "spec/betterlog/log_spec.rb".freeze, "spec/betterlog/logger_spec.rb".freeze, "spec/spec_helper.rb".freeze]
22
22
 
23
23
  if s.respond_to? :specification_version then
24
24
  s.specification_version = 4
25
+ end
25
26
 
26
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.10.0"])
28
- s.add_development_dependency(%q<rake>.freeze, [">= 0"])
29
- s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
30
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
31
- s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.3", ">= 1.22.0"])
32
- s.add_runtime_dependency(%q<complex_config>.freeze, [">= 0"])
33
- s.add_runtime_dependency(%q<file-tail>.freeze, ["~> 1.0"])
34
- s.add_runtime_dependency(%q<json>.freeze, ["~> 2.0"])
35
- s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
36
- s.add_runtime_dependency(%q<redis>.freeze, [">= 2.4"])
37
- s.add_runtime_dependency(%q<redlock>.freeze, [">= 0"])
38
- s.add_runtime_dependency(%q<excon>.freeze, [">= 0"])
39
- else
40
- s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.10.0"])
41
- s.add_dependency(%q<rake>.freeze, [">= 0"])
42
- s.add_dependency(%q<rspec>.freeze, [">= 0"])
43
- s.add_dependency(%q<simplecov>.freeze, [">= 0"])
44
- s.add_dependency(%q<tins>.freeze, ["~> 1.3", ">= 1.22.0"])
45
- s.add_dependency(%q<complex_config>.freeze, [">= 0"])
46
- s.add_dependency(%q<file-tail>.freeze, ["~> 1.0"])
47
- s.add_dependency(%q<json>.freeze, ["~> 2.0"])
48
- s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
49
- s.add_dependency(%q<redis>.freeze, [">= 2.4"])
50
- s.add_dependency(%q<redlock>.freeze, [">= 0"])
51
- s.add_dependency(%q<excon>.freeze, [">= 0"])
52
- end
27
+ if s.respond_to? :add_runtime_dependency then
28
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.11.0"])
29
+ s.add_development_dependency(%q<rake>.freeze, [">= 0"])
30
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
31
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
32
+ s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.3", ">= 1.22.0"])
33
+ s.add_runtime_dependency(%q<complex_config>.freeze, [">= 0"])
34
+ s.add_runtime_dependency(%q<file-tail>.freeze, ["~> 1.0"])
35
+ s.add_runtime_dependency(%q<json>.freeze, ["~> 2.0"])
36
+ s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
37
+ s.add_runtime_dependency(%q<redis>.freeze, [">= 2.8"])
38
+ s.add_runtime_dependency(%q<redlock>.freeze, [">= 0"])
39
+ s.add_runtime_dependency(%q<excon>.freeze, [">= 0"])
53
40
  else
54
- s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.10.0"])
41
+ s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.11.0"])
55
42
  s.add_dependency(%q<rake>.freeze, [">= 0"])
56
43
  s.add_dependency(%q<rspec>.freeze, [">= 0"])
57
44
  s.add_dependency(%q<simplecov>.freeze, [">= 0"])
@@ -60,7 +47,7 @@ Gem::Specification.new do |s|
60
47
  s.add_dependency(%q<file-tail>.freeze, ["~> 1.0"])
61
48
  s.add_dependency(%q<json>.freeze, ["~> 2.0"])
62
49
  s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
63
- s.add_dependency(%q<redis>.freeze, [">= 2.4"])
50
+ s.add_dependency(%q<redis>.freeze, [">= 2.8"])
64
51
  s.add_dependency(%q<redlock>.freeze, [">= 0"])
65
52
  s.add_dependency(%q<excon>.freeze, [">= 0"])
66
53
  end
data/bin/betterlog_pusher CHANGED
@@ -10,7 +10,16 @@ lock_time = Integer(ENV.fetch('BETTERLOG_LOCK_TIME', 60_000))
10
10
  url = ENV.fetch('BETTERLOG_SERVER_URL')
11
11
  name = ENV['BETTERLOG_NAME']
12
12
  redis_url = ENV.fetch('REDIS_URL')
13
- redis = Redis.new(url: redis_url)
13
+ redis =
14
+ if redis_sentinels = ENV['REDIS_SENTINELS']&.split(?,)
15
+ redis_sentinels.map! { |s|
16
+ h, p = s.split(?:, 2)
17
+ { host: h, port: (p || 26379).to_i }
18
+ }
19
+ Redis.new(url: redis_url, sentinels: redis_sentinels, role: :master)
20
+ else
21
+ Redis.new(url: redis_url)
22
+ end
14
23
  lm = Redlock::Client.new([ redis_url ])
15
24
  logger = Betterlog::Logger.new(redis, name: name)
16
25
 
data/config/log.yml CHANGED
@@ -15,7 +15,7 @@ development: &development
15
15
  "{%0.<%= ENV.fetch('COLUMNS', 80).to_i / 2 %>%message}"
16
16
  {host}
17
17
  {location}
18
- {file}{-%O%backtrace}{-%O%meta}
18
+ {file}{-%O%error_class}{-%O%backtrace}{-%O%meta}
19
19
  d: *default_format
20
20
  long: &long_format |
21
21
  timestamp: {%lt%timestamp}
@@ -1,6 +1,6 @@
1
1
  module Betterlog
2
2
  # Betterlog version
3
- VERSION = '0.8.1'
3
+ VERSION = '0.9.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betterlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-15 00:00:00.000000000 Z
11
+ date: 2020-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.0
19
+ version: 1.11.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.10.0
26
+ version: 1.11.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: '2.4'
151
+ version: '2.8'
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: '2.4'
158
+ version: '2.8'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: redlock
161
161
  requirement: !ruby/object:Gem::Requirement
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  - !ruby/object:Gem::Version
267
267
  version: '0'
268
268
  requirements: []
269
- rubygems_version: 3.0.6
269
+ rubygems_version: 3.1.2
270
270
  signing_key:
271
271
  specification_version: 4
272
272
  summary: Structured logging support for bp