central_logger 0.3.1 → 0.3.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{central_logger}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Phil Burrows", "Alex Stupka"]
12
- s.date = %q{2011-03-08}
12
+ s.date = %q{2011-03-15}
13
13
  s.description = %q{Centralized logging for rails apps using MongoDB. The idea and the core code is from http://github.com/peburrows/central_logger}
14
14
  s.email = %q{astupka@customink.com}
15
15
  s.extra_rdoc_files = [
@@ -37,12 +37,13 @@ module CentralLogger
37
37
  end
38
38
 
39
39
  def add(severity, message = nil, progname = nil, &block)
40
- super
41
40
  if @level <= severity && message.present? && @mongo_record.present?
42
- # remove Rails colorization to get the actual message
43
- message.gsub!(/(\e(\[([\d;]*[mz]?))?)?/, '').strip! if logging_colorized?
44
- @mongo_record[:messages][LOG_LEVEL_SYM[severity]] << message
41
+ # do not modify the original message used by the buffered logger
42
+ msg = logging_colorized? ? message.gsub(/(\e(\[([\d;]*[mz]?))?)?/, '').strip : message
43
+ @mongo_record[:messages][LOG_LEVEL_SYM[severity]] << msg
45
44
  end
45
+ # may modify the original message
46
+ super
46
47
  end
47
48
 
48
49
  # Drop the capped_collection and recreate it
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Phil Burrows
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-08 00:00:00 -05:00
18
+ date: 2011-03-15 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency