prefab-cloud-ruby 0.0.27 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/prefab/client.rb +4 -0
- data/lib/prefab/logger_client.rb +13 -1
- data/prefab-cloud-ruby.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c934f3fd7a0c76ce64b527a218242a790511d57c
|
|
4
|
+
data.tar.gz: 68888c9da30d4828192a060432e7de77993d7146
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 307e09f82acca69b21a20a701d346c7bf8227f28dc5c02368ab64ed6d4d7bb22d2271278403cb104d773b478e150d68711f482987d5d2b92f056ae1f6670e64c
|
|
7
|
+
data.tar.gz: 53c07b191c35e24f1bce6583c29b72905ef3ba23ed46321c3116b29761a47ad4a719eb7cf0d2902da7900c70c3ce323cef13cbf888d78d90e666ffbbaab41431
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.0.
|
|
1
|
+
0.0.28
|
data/lib/prefab/client.rb
CHANGED
data/lib/prefab/logger_client.rb
CHANGED
|
@@ -8,6 +8,7 @@ module Prefab
|
|
|
8
8
|
super(logdev)
|
|
9
9
|
self.formatter= formatter
|
|
10
10
|
@config_client = BootstrappingConfigClient.new
|
|
11
|
+
@silences = Concurrent::Map.new(:initial_capacity => 2)
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def add(severity, message = nil, progname = nil)
|
|
@@ -24,7 +25,7 @@ module Prefab
|
|
|
24
25
|
level = level_of(path)
|
|
25
26
|
progname = "#{path}: #{progname}"
|
|
26
27
|
severity ||= UNKNOWN
|
|
27
|
-
if @logdev.nil?
|
|
28
|
+
if @logdev.nil? || severity < level || @silences[local_log_id]
|
|
28
29
|
return true
|
|
29
30
|
end
|
|
30
31
|
if progname.nil?
|
|
@@ -91,6 +92,17 @@ module Prefab
|
|
|
91
92
|
@config_client = config_client
|
|
92
93
|
end
|
|
93
94
|
|
|
95
|
+
def local_log_id
|
|
96
|
+
Thread.current.__id__
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def silence
|
|
100
|
+
@silences[local_log_id] = true
|
|
101
|
+
yield self
|
|
102
|
+
ensure
|
|
103
|
+
@silences[local_log_id] = false
|
|
104
|
+
end
|
|
105
|
+
|
|
94
106
|
private
|
|
95
107
|
|
|
96
108
|
# Find the closest match to 'log_level.path' in config
|
data/prefab-cloud-ruby.gemspec
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: prefab-cloud-ruby 0.0.
|
|
5
|
+
# stub: prefab-cloud-ruby 0.0.28 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "prefab-cloud-ruby".freeze
|
|
9
|
-
s.version = "0.0.
|
|
9
|
+
s.version = "0.0.28"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib".freeze]
|
|
13
13
|
s.authors = ["Jeff Dwyer".freeze]
|
|
14
|
-
s.date = "2018-09-
|
|
14
|
+
s.date = "2018-09-26"
|
|
15
15
|
s.description = "RateLimits & Config as a service".freeze
|
|
16
16
|
s.email = "jdwyer@prefab.cloud".freeze
|
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prefab-cloud-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.28
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeff Dwyer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: grpc
|