madvertise-logging 1.2.1-java → 1.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +3 -0
- data/.travis.yml +3 -3
- data/Gemfile +1 -0
- data/lib/madvertise/logging/improved_logger.rb +9 -18
- data/madvertise-logging.gemspec +1 -1
- metadata +9 -4
- data/spec/spec.opts +0 -2
data/.rspec
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -249,7 +249,7 @@ module Madvertise
|
|
249
249
|
|
250
250
|
case @backend
|
251
251
|
when :log4j
|
252
|
-
|
252
|
+
create_log4j_logger
|
253
253
|
when :ruby
|
254
254
|
create_ruby_logger(STDOUT)
|
255
255
|
when :stdout
|
@@ -315,30 +315,21 @@ module Madvertise
|
|
315
315
|
end
|
316
316
|
|
317
317
|
def create_logger
|
318
|
-
|
319
|
-
when 'java'
|
320
|
-
create_log4j_logger
|
321
|
-
else
|
322
|
-
create_ruby_logger(@logfile)
|
323
|
-
end
|
318
|
+
create_ruby_logger(@logfile)
|
324
319
|
end
|
325
320
|
|
326
321
|
def create_log4j_logger
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
Log4jruby::Logger.get($0).tap do |logger|
|
331
|
-
@backend = :log4j
|
332
|
-
configure_log4j(logger)
|
333
|
-
end
|
334
|
-
rescue LoadError
|
335
|
-
self.logger = :ruby
|
336
|
-
error("Couldn't load log4jruby gem, falling back to pure ruby Logger")
|
322
|
+
Log4jruby::Logger.get($0).tap do |logger|
|
323
|
+
@backend = :log4j
|
324
|
+
configure_log4j(logger)
|
337
325
|
end
|
338
326
|
end
|
339
327
|
|
340
328
|
def configure_log4j(logger)
|
341
|
-
return unless
|
329
|
+
return unless RUBY_PLATFORM == 'java'
|
330
|
+
|
331
|
+
require 'log4j'
|
332
|
+
require 'log4jruby'
|
342
333
|
|
343
334
|
@console = org.apache.log4j.ConsoleAppender.new
|
344
335
|
@console.setLayout(org.apache.log4j.PatternLayout.new(Formatter.log4j_format))
|
data/madvertise-logging.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "madvertise-logging"
|
5
|
-
spec.version = "1.
|
5
|
+
spec.version = "1.3.0"
|
6
6
|
spec.authors = ["madvertise Mobile Advertising GmbH"]
|
7
7
|
spec.email = ["tech@madvertise.com"]
|
8
8
|
spec.description = %q{Advanced logging classes with buffer backend, transactions, multi logger, etc}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: madvertise-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: java
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: log4jruby
|
@@ -51,6 +51,7 @@ extensions: []
|
|
51
51
|
extra_rdoc_files: []
|
52
52
|
files:
|
53
53
|
- .gitignore
|
54
|
+
- .rspec
|
54
55
|
- .travis.yml
|
55
56
|
- .yardopts
|
56
57
|
- Gemfile
|
@@ -68,7 +69,6 @@ files:
|
|
68
69
|
- madvertise-logging.gemspec
|
69
70
|
- spec/improved_logger_spec.rb
|
70
71
|
- spec/multi_logger_spec.rb
|
71
|
-
- spec/spec.opts
|
72
72
|
- spec/spec_helper.rb
|
73
73
|
- tasks/reek.rake
|
74
74
|
- tasks/rspec.rake
|
@@ -83,13 +83,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
83
|
requirements:
|
84
84
|
- - '>='
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
+
segments:
|
87
|
+
- 0
|
86
88
|
version: '0'
|
89
|
+
hash: 2
|
87
90
|
none: false
|
88
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
92
|
requirements:
|
90
93
|
- - '>='
|
91
94
|
- !ruby/object:Gem::Version
|
95
|
+
segments:
|
96
|
+
- 0
|
92
97
|
version: '0'
|
98
|
+
hash: 2
|
93
99
|
none: false
|
94
100
|
requirements: []
|
95
101
|
rubyforge_project:
|
@@ -100,6 +106,5 @@ summary: Advanced logging classes with buffer backend, transactions, multi logge
|
|
100
106
|
test_files:
|
101
107
|
- spec/improved_logger_spec.rb
|
102
108
|
- spec/multi_logger_spec.rb
|
103
|
-
- spec/spec.opts
|
104
109
|
- spec/spec_helper.rb
|
105
110
|
has_rdoc:
|
data/spec/spec.opts
DELETED