imprint 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,7 +35,7 @@ if defined?(ActiveSupport::BufferedLogger)
35
35
  end
36
36
 
37
37
  if defined?(ActiveSupport::Logger::SimpleFormatter)
38
- #Rails 4
38
+ #Rails 4 dev / upgraded apps
39
39
  class ActiveSupport::Logger::SimpleFormatter
40
40
  def call(severity, time, progname, message)
41
41
  message = (message || (block && block.call) || progname).to_s
@@ -48,5 +48,17 @@ if defined?(ActiveSupport::Logger::SimpleFormatter)
48
48
  message
49
49
  end
50
50
  end
51
+
52
+ #Rails 4 production newly generated apps
53
+ class Logger::Formatter
54
+ def call(severity, time, progname, msg)
55
+ message = msg2str(msg)
56
+ message = "#{message}\n" unless message[-1] == "\n"
57
+ if (defined?(Imprint::Tracer)) && message && message.is_a?(String) && message.length > 1 && Imprint::Tracer.get_trace_id && !message.include?('trace_id=')
58
+ message = message.gsub("\n"," trace_id=#{Imprint::Tracer.get_trace_id}\n")
59
+ end
60
+ Format % [severity[0..0], format_datetime(time), $$, severity, progname, message]
61
+ end
62
+ end
51
63
 
52
64
  end
@@ -1,3 +1,3 @@
1
1
  module Imprint
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-30 00:00:00.000000000 Z
12
+ date: 2014-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  segments:
149
149
  - 0
150
- hash: 1212060812570549601
150
+ hash: 402883591187876401
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  segments:
158
158
  - 0
159
- hash: 1212060812570549601
159
+ hash: 402883591187876401
160
160
  requirements: []
161
161
  rubyforge_project:
162
162
  rubygems_version: 1.8.23