central_logger 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/central_logger.gemspec +2 -2
- data/lib/central_logger/mongo_logger.rb +5 -4
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/central_logger.gemspec
CHANGED
@@ -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.
|
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-
|
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
|
-
#
|
43
|
-
message.gsub
|
44
|
-
@mongo_record[:messages][LOG_LEVEL_SYM[severity]] <<
|
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
|
-
-
|
9
|
-
version: 0.3.
|
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-
|
18
|
+
date: 2011-03-15 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|