log_tribe 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/.versions.conf +1 -1
- data/lib/log_tribe/loggers.rb +11 -1
- data/lib/log_tribe/version.rb +1 -1
- data/log_tribe.gemspec +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78acc57940fb91ac5c08c2c798fda404264a9a74
|
4
|
+
data.tar.gz: 577c8a79a2122c87e144d2ccdcb8b6e100e50dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6214b41b427e948091f8dc58d9097741026449417027042ec114b78b4e7095edd5a592c07928134ef28869004519e977586105f0831c2703ba60564958f3c5a5
|
7
|
+
data.tar.gz: a8ca7766ed0f98d5c51762864164e2c2c9c4f0d72e4f96938837616a3d21c67cccd63652be8e404d4d53cf04ca9b524521285f32640151bce94c5adf46d21aaf
|
data/.travis.yml
CHANGED
data/.versions.conf
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
ruby=ruby-2.
|
1
|
+
ruby=ruby-2.3.0
|
2
2
|
ruby-gemset=log_tribe
|
data/lib/log_tribe/loggers.rb
CHANGED
@@ -11,6 +11,7 @@ module LogTribe
|
|
11
11
|
def level=(value)
|
12
12
|
@level = value
|
13
13
|
@loggers.each do |logger|
|
14
|
+
next unless logger
|
14
15
|
logger.level = value if logger.respond_to?(:level)
|
15
16
|
end
|
16
17
|
end
|
@@ -22,6 +23,7 @@ module LogTribe
|
|
22
23
|
def progname=(value)
|
23
24
|
@progname = value
|
24
25
|
@loggers.each do |logger|
|
26
|
+
next unless logger
|
25
27
|
logger.progname = value if logger.respond_to?(:progname)
|
26
28
|
end
|
27
29
|
end
|
@@ -35,6 +37,7 @@ module LogTribe
|
|
35
37
|
def datetime_format=(datetime_format)
|
36
38
|
@datetime_format = datetime_format
|
37
39
|
@loggers.each do |logger|
|
40
|
+
next unless logger
|
38
41
|
logger.datetime_format = datetime_format if logger.respond_to?(:datetime_format)
|
39
42
|
end
|
40
43
|
end
|
@@ -57,6 +60,7 @@ module LogTribe
|
|
57
60
|
def formatter=(callable)
|
58
61
|
@formatter = callable
|
59
62
|
@loggers.each do |logger|
|
63
|
+
next unless logger
|
60
64
|
logger.formatter = callable if logger.respond_to?(:formatter)
|
61
65
|
end
|
62
66
|
end
|
@@ -140,6 +144,7 @@ module LogTribe
|
|
140
144
|
#
|
141
145
|
def add(severity, message = nil, progname = nil, &block)
|
142
146
|
@loggers.each do |logger|
|
147
|
+
next unless logger
|
143
148
|
if logger.respond_to?(:add)
|
144
149
|
logger.add(severity, message, progname, &block)
|
145
150
|
elsif defined?(::Fluent::Logger) && logger.respond_to?(:post)
|
@@ -158,6 +163,7 @@ module LogTribe
|
|
158
163
|
#
|
159
164
|
def <<(msg)
|
160
165
|
@loggers.each do |logger|
|
166
|
+
next unless logger
|
161
167
|
if logger.respond_to?(:<<)
|
162
168
|
logger << msg
|
163
169
|
elsif defined?(::Fluent::Logger) && logger.respond_to?(:post)
|
@@ -172,7 +178,11 @@ module LogTribe
|
|
172
178
|
#
|
173
179
|
def close
|
174
180
|
@loggers.each do |logger|
|
175
|
-
|
181
|
+
next unless logger
|
182
|
+
log_device = logger.instance_variable_get('@logdev')
|
183
|
+
next unless log_device
|
184
|
+
log_device.flush if log_device.respond_to?(:flush)
|
185
|
+
logger.close if log_device.respond_to?(:stat)
|
176
186
|
end
|
177
187
|
end
|
178
188
|
end
|
data/lib/log_tribe/version.rb
CHANGED
data/log_tribe.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
18
18
|
# delete this section to allow pushing this gem to any host.
|
19
|
-
|
19
|
+
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata)
|
20
20
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
21
21
|
|
22
22
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -30,5 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_development_dependency 'rspec', '~> 3.3'
|
31
31
|
spec.add_development_dependency 'simplecov', '~> 0'
|
32
32
|
spec.add_development_dependency 'coveralls', '~> 0'
|
33
|
+
spec.add_development_dependency 'memory_profiler'.freeze, '~> 0'.freeze
|
33
34
|
spec.add_development_dependency 'yard', '~> 0'
|
34
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: log_tribe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Kakesa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,6 +100,20 @@ dependencies:
|
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: memory_profiler
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: yard
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
170
|
version: '0'
|
157
171
|
requirements: []
|
158
172
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.5.1
|
160
174
|
signing_key:
|
161
175
|
specification_version: 4
|
162
176
|
summary: Write logs messages to multiple destinations.
|