better_logging 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/better_logging.gemspec +1 -1
- data/lib/better_logging/better_logging.rb +6 -0
- metadata +2 -2
data/better_logging.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "better_logging"
|
6
|
-
s.version = "1.0.
|
6
|
+
s.version = "1.0.2"
|
7
7
|
s.authors = ["Paul Dowman"]
|
8
8
|
s.email = ["paul@pauldowman.com"]
|
9
9
|
s.homepage = "https://github.com/pauldowman/better_logging"
|
@@ -117,6 +117,12 @@ module PaulDowman
|
|
117
117
|
def add_with_extra_info(severity, message = nil, progname = nil, &block)
|
118
118
|
update_pid
|
119
119
|
time = @@verbose ? "#{Time.now.iso8601(@@fraction_digits)} " : ""
|
120
|
+
|
121
|
+
if message.nil?
|
122
|
+
if block_given?
|
123
|
+
message = yield
|
124
|
+
end
|
125
|
+
end
|
120
126
|
message = "#{time}#{ActiveSupport::BufferedLogger.severity_name(severity)} #{message}"
|
121
127
|
|
122
128
|
# Make sure every line has the PID and hostname and custom string
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: better_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
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: 2012-02
|
12
|
+
date: 2012-03-02 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: A Rails plugin that improves the log format, and adds an optional "Exception"
|
15
15
|
parameter to the warn() and error() methods to print a stack trace automatically.
|