madvertise-logging 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/madvertise/logging/improved_logger.rb +6 -4
- data/madvertise-logging.gemspec +1 -1
- metadata +7 -9
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0f3a47d66f7cb95823d3d17f6c7a978b784b6e36
|
4
|
+
data.tar.gz: 6ba9ad228dfb9a15e46392231e7a2413498a40f7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ff64dd01e789c828f9adcc8d5af2c7b49e69f5683e2ef9bdd3519f24ae56e65fb8f6adf433f7ac83862cc641fca5bd4db60d3e1cbe220af95b60056a787c3225
|
7
|
+
data.tar.gz: b67f7b14f4e35469df060215dd071485c1a5a2f824bd45704e6bc545b671d421e8773cd3a9616362ef6dd0614c499080286d100bd26ea91ba3c16d92274ec022
|
@@ -114,8 +114,8 @@ module Madvertise
|
|
114
114
|
# @param [Symbol, Fixnum] level New level as Symbol or Fixnum from Logger class.
|
115
115
|
# @return [Fixnum] New level converted to Fixnum from Logger class.
|
116
116
|
def level=(level)
|
117
|
-
@console.setThreshold(org.apache.log4j.Level.const_get(level.to_s.upcase.to_sym)) if @console
|
118
117
|
logger.level = level.is_a?(Symbol) ? self.class.severities[level] : level
|
118
|
+
configure_log4j(logger)
|
119
119
|
define_level_methods
|
120
120
|
end
|
121
121
|
|
@@ -327,8 +327,8 @@ module Madvertise
|
|
327
327
|
begin
|
328
328
|
require 'log4j'
|
329
329
|
require 'log4jruby'
|
330
|
-
|
331
|
-
|
330
|
+
Log4jruby::Logger.get($0).tap do |logger|
|
331
|
+
@backend = :log4j
|
332
332
|
configure_log4j(logger)
|
333
333
|
end
|
334
334
|
rescue LoadError
|
@@ -338,9 +338,11 @@ module Madvertise
|
|
338
338
|
end
|
339
339
|
|
340
340
|
def configure_log4j(logger)
|
341
|
+
return unless @backend == :log4j
|
342
|
+
|
341
343
|
@console = org.apache.log4j.ConsoleAppender.new
|
342
344
|
@console.setLayout(org.apache.log4j.PatternLayout.new(Formatter.log4j_format))
|
343
|
-
@console.setThreshold(org.apache.log4j.Level
|
345
|
+
@console.setThreshold(org.apache.log4j.Level.const_get(self.class.severities.key(logger.level).to_s.upcase.to_sym))
|
344
346
|
@console.activateOptions
|
345
347
|
|
346
348
|
org.apache.log4j.Logger.getRootLogger.tap do |root|
|
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.1.
|
5
|
+
spec.version = "1.1.2"
|
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,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: madvertise-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- madvertise Mobile Advertising GmbH
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: Advanced logging classes with buffer backend, transactions, multi logger,
|
15
14
|
etc
|
@@ -44,27 +43,26 @@ files:
|
|
44
43
|
- tasks/yard.rake
|
45
44
|
homepage: https://github.com/madvertise/logging
|
46
45
|
licenses: []
|
46
|
+
metadata: {}
|
47
47
|
post_install_message:
|
48
48
|
rdoc_options: []
|
49
49
|
require_paths:
|
50
50
|
- lib
|
51
51
|
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
52
|
requirements:
|
54
|
-
- -
|
53
|
+
- - '>='
|
55
54
|
- !ruby/object:Gem::Version
|
56
55
|
version: '0'
|
57
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
57
|
requirements:
|
60
|
-
- -
|
58
|
+
- - '>='
|
61
59
|
- !ruby/object:Gem::Version
|
62
60
|
version: '0'
|
63
61
|
requirements: []
|
64
62
|
rubyforge_project:
|
65
|
-
rubygems_version:
|
63
|
+
rubygems_version: 2.0.3
|
66
64
|
signing_key:
|
67
|
-
specification_version:
|
65
|
+
specification_version: 4
|
68
66
|
summary: Advanced logging classes with buffer backend, transactions, multi logger,
|
69
67
|
etc
|
70
68
|
test_files:
|