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 +4 -4
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/betterlog.gemspec +20 -33
- data/bin/betterlog_pusher +10 -1
- data/config/log.yml +1 -1
- data/lib/betterlog/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35b30ba42034bf3d4a09a4558f8a21b8e48b2a5145b2e56299b4f73f9e14ebd4
|
4
|
+
data.tar.gz: 03df9bb690c3fedb95696fa1c0708a08da9ed5f41246233115fa6444b761a1f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4982f6fb3cd975ef1069a8b36617e5494f346084069d3d6eed723152e854bde651d76859cb4e33681889c22821b8be19626dcc1fa396a4bdd166373e5def483e
|
7
|
+
data.tar.gz: 109c8fd2ff8c4f9217188450793aeacf32a580f47c82eafec33e6abea77fa152028207f82a05fbab91142fd73eaf8a34a2493bd1d85e2e3e770434fce12acf27
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
data/betterlog.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: betterlog 0.
|
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.
|
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 = "
|
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.
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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.
|
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.
|
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
|
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}
|
data/lib/betterlog/version.rb
CHANGED
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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.
|
269
|
+
rubygems_version: 3.1.2
|
270
270
|
signing_key:
|
271
271
|
specification_version: 4
|
272
272
|
summary: Structured logging support for bp
|