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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25a797e9bfa52fb490695da4abdba6798d985dd4
4
- data.tar.gz: f4364826e190c3a692e83bb653cd4e96c79f19f5
3
+ metadata.gz: 78acc57940fb91ac5c08c2c798fda404264a9a74
4
+ data.tar.gz: 577c8a79a2122c87e144d2ccdcb8b6e100e50dca
5
5
  SHA512:
6
- metadata.gz: 966c96b875afff843394bc948c3fb9ada38df108128ac46fee34edf2bfb971225b377423eb2fe02138e0f6093417f3e4ed750fbb270d84c5ee103716982f3612
7
- data.tar.gz: 44391c7e8074776a8e08b4cf451ac5c1617c40fc3f714ec9c278ebfeffffef2942978b95d521c86ac643fa8e2632c0489cc82e4b8647d56037906514354ee80b
6
+ metadata.gz: 6214b41b427e948091f8dc58d9097741026449417027042ec114b78b4e7095edd5a592c07928134ef28869004519e977586105f0831c2703ba60564958f3c5a5
7
+ data.tar.gz: a8ca7766ed0f98d5c51762864164e2c2c9c4f0d72e4f96938837616a3d21c67cccd63652be8e404d4d53cf04ca9b524521285f32640151bce94c5adf46d21aaf
@@ -3,4 +3,5 @@ rvm:
3
3
  - 2.0.0
4
4
  - 2.1.6
5
5
  - 2.2.4
6
+ - 2.3.0
6
7
  script: bundle exec rspec spec
@@ -1,2 +1,2 @@
1
- ruby=ruby-2.2.4
1
+ ruby=ruby-2.3.0
2
2
  ruby-gemset=log_tribe
@@ -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
- logger.close if logger.respond_to?(:close)
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
@@ -1,3 +1,3 @@
1
1
  module LogTribe
2
- VERSION = '0.2.9'.freeze
2
+ VERSION = '0.2.10'.freeze
3
3
  end
@@ -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
- fail 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata)
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.9
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-01-18 00:00:00.000000000 Z
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.4.8
173
+ rubygems_version: 2.5.1
160
174
  signing_key:
161
175
  specification_version: 4
162
176
  summary: Write logs messages to multiple destinations.