betterlog 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +60 -0
- data/Dockerfile +3 -3
- data/Makefile +1 -1
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/betterlog.gemspec +7 -5
- data/lib/betterlog.rb +0 -4
- data/lib/betterlog/log/event_formatter.rb +3 -0
- data/lib/betterlog/log/severity.rb +2 -0
- data/lib/betterlog/logger.rb +5 -1
- data/lib/betterlog/railtie.rb +1 -0
- data/lib/betterlog/version.rb +1 -1
- data/spec/spec_helper.rb +6 -0
- metadata +18 -4
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12593a18d28fc916e5c30257103937523a972f44a588087dd929742d99043b37
|
4
|
+
data.tar.gz: d0db15ffbe77f7f088c61c073c72a6847a79b07fd9c7f075fa4b8acdfdedaf50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e1b2ff2e6ac4bbe60eefcf48755e143fda9eb122c3392a9cba45e8996df5473903f4bb2a36bb657b1a80acf451215bf377782a33ba447ac61bad5ee7723644f
|
7
|
+
data.tar.gz: fca5f361f59320ed444e87f49a620a19b6e9a8d446b1e5c2e8255249915ffbe705787a660cf687c265105c60e24e9768ac427f360b18dafb4b282bf827aa7407
|
@@ -0,0 +1,60 @@
|
|
1
|
+
version: v1.0
|
2
|
+
name: Betterlog pipeline
|
3
|
+
agent:
|
4
|
+
machine:
|
5
|
+
type: e1-standard-2
|
6
|
+
os_image: ubuntu1804
|
7
|
+
|
8
|
+
blocks:
|
9
|
+
- name: Caching
|
10
|
+
task:
|
11
|
+
prologue:
|
12
|
+
commands:
|
13
|
+
- checkout
|
14
|
+
jobs:
|
15
|
+
- name: cache bundle
|
16
|
+
commands:
|
17
|
+
- sem-version ruby 2.7.2
|
18
|
+
- cache restore gems-$SEMAPHORE_GIT_BRANCH,gems-master
|
19
|
+
- bundle config jobs $(getconf _NPROCESSORS_ONLN)
|
20
|
+
- bundle install
|
21
|
+
- cache store gems-$SEMAPHORE_GIT_BRANCH vendor/bundle
|
22
|
+
|
23
|
+
- name: "Unit tests"
|
24
|
+
task:
|
25
|
+
env_vars:
|
26
|
+
- name: RAILS_ENV
|
27
|
+
value: test
|
28
|
+
prologue:
|
29
|
+
commands:
|
30
|
+
- checkout
|
31
|
+
|
32
|
+
# Setup ruby
|
33
|
+
- sem-version ruby 2.7.2
|
34
|
+
|
35
|
+
# Setup gems
|
36
|
+
- cache restore gems-$SEMAPHORE_GIT_BRANCH,gems-master
|
37
|
+
- bundle config jobs $(getconf _NPROCESSORS_ONLN)
|
38
|
+
- bundle install
|
39
|
+
|
40
|
+
jobs:
|
41
|
+
- name: RSpec Unit Tests
|
42
|
+
commands:
|
43
|
+
- rake
|
44
|
+
|
45
|
+
- name: Building Docker Image
|
46
|
+
task:
|
47
|
+
|
48
|
+
secrets:
|
49
|
+
- name: GCP
|
50
|
+
|
51
|
+
prologue:
|
52
|
+
commands:
|
53
|
+
- gcloud auth activate-service-account --key-file=.secrets/gcp.json
|
54
|
+
- gcloud auth configure-docker -q
|
55
|
+
- checkout
|
56
|
+
|
57
|
+
jobs:
|
58
|
+
- name: Building and pushing
|
59
|
+
commands:
|
60
|
+
- make build push-latest
|
data/Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
FROM alpine:3.12.
|
1
|
+
FROM alpine:3.12.1 AS builder
|
2
2
|
|
3
3
|
# Update/Upgrade/Add packages for building
|
4
4
|
|
@@ -16,9 +16,9 @@ RUN make clobber
|
|
16
16
|
|
17
17
|
RUN go get -u github.com/betterplace/go-init
|
18
18
|
|
19
|
-
RUN make
|
19
|
+
RUN make setup all
|
20
20
|
|
21
|
-
FROM alpine:3.12.
|
21
|
+
FROM alpine:3.12.1 AS runner
|
22
22
|
|
23
23
|
# Update/Upgrade/Add packages
|
24
24
|
|
data/Makefile
CHANGED
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.15.0
|
data/betterlog.gemspec
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: betterlog 0.
|
2
|
+
# stub: betterlog 0.15.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.15.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 = "2020-
|
11
|
+
s.date = "2020-11-02"
|
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]
|
15
15
|
s.extra_rdoc_files = ["README.md".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]
|
16
|
-
s.files = [".gitignore".freeze, ".
|
16
|
+
s.files = [".gitignore".freeze, ".semaphore/semaphore.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, "cloudbuild.yaml".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.1.
|
19
|
+
s.rubygems_version = "3.1.4".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
|
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
s.add_development_dependency(%q<rake>.freeze, [">= 0"])
|
30
30
|
s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
|
31
31
|
s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
|
32
|
+
s.add_development_dependency(%q<mock_redis>.freeze, [">= 0"])
|
32
33
|
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.3", ">= 1.22.0"])
|
33
34
|
s.add_runtime_dependency(%q<complex_config>.freeze, [">= 0"])
|
34
35
|
s.add_runtime_dependency(%q<file-tail>.freeze, ["~> 1.0"])
|
@@ -42,6 +43,7 @@ Gem::Specification.new do |s|
|
|
42
43
|
s.add_dependency(%q<rake>.freeze, [">= 0"])
|
43
44
|
s.add_dependency(%q<rspec>.freeze, [">= 0"])
|
44
45
|
s.add_dependency(%q<simplecov>.freeze, [">= 0"])
|
46
|
+
s.add_dependency(%q<mock_redis>.freeze, [">= 0"])
|
45
47
|
s.add_dependency(%q<tins>.freeze, ["~> 1.3", ">= 1.22.0"])
|
46
48
|
s.add_dependency(%q<complex_config>.freeze, [">= 0"])
|
47
49
|
s.add_dependency(%q<file-tail>.freeze, ["~> 1.0"])
|
data/lib/betterlog.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
require 'tins/xt'
|
2
2
|
require 'json'
|
3
|
-
require 'logger'
|
4
|
-
require 'time'
|
5
3
|
require 'complex_config'
|
6
|
-
require 'term/ansicolor'
|
7
4
|
|
8
5
|
module Betterlog
|
9
6
|
end
|
@@ -14,7 +11,6 @@ require 'betterlog/global_metadata'
|
|
14
11
|
require 'betterlog/logger'
|
15
12
|
|
16
13
|
if defined? Rails
|
17
|
-
require 'betterlog/log_event_formatter'
|
18
14
|
require 'betterlog/railtie'
|
19
15
|
end
|
20
16
|
|
data/lib/betterlog/logger.rb
CHANGED
data/lib/betterlog/railtie.rb
CHANGED
data/lib/betterlog/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -9,5 +9,11 @@ begin
|
|
9
9
|
require 'byebug'
|
10
10
|
rescue LoadError
|
11
11
|
end
|
12
|
+
require 'mock_redis'
|
13
|
+
class MockRedis
|
14
|
+
class BaseConnectionError < StandardError; end
|
15
|
+
class CannotConnectError < BaseConnectionError; end
|
16
|
+
end
|
17
|
+
Redis=MockRedis
|
12
18
|
require 'betterlog'
|
13
19
|
Betterlog::Log.default_logger = Logger.new(nil)
|
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.15.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: 2020-
|
11
|
+
date: 2020-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mock_redis
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: tins
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,7 +220,7 @@ extra_rdoc_files:
|
|
206
220
|
- lib/betterlog/version.rb
|
207
221
|
files:
|
208
222
|
- ".gitignore"
|
209
|
-
- ".
|
223
|
+
- ".semaphore/semaphore.yml"
|
210
224
|
- Dockerfile
|
211
225
|
- Gemfile
|
212
226
|
- LICENSE
|
@@ -267,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
281
|
- !ruby/object:Gem::Version
|
268
282
|
version: '0'
|
269
283
|
requirements: []
|
270
|
-
rubygems_version: 3.1.
|
284
|
+
rubygems_version: 3.1.4
|
271
285
|
signing_key:
|
272
286
|
specification_version: 4
|
273
287
|
summary: Structured logging support for bp
|