outland-tag_runes 1.1.2 → 1.1.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/outland/tag_runes/version.rb +1 -1
- data/lib/outland/tag_runes.rb +8 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4db0b3df4e6492c651345a1042a3585da16a44b8
|
4
|
+
data.tar.gz: 0432d144b908ae4dff106cdd3725db6b11705009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1ed8f18b2c1f9138b00359526a2dc10ed4667b125e309ce322e9dff4265f7f89dda85a89828777d9121dd9afedc902b36d2b1dc2190ac8d6a5029bace4c14f1
|
7
|
+
data.tar.gz: 7510c7066b7a87804c9001540340efb9fa676acb129428fa58230e56b6bab432c64f5353788caeb065c6ca06c12e71a9f94438ad56f3116a6f1aa381ba009b5c
|
data/CHANGELOG.md
CHANGED
data/lib/outland/tag_runes.rb
CHANGED
@@ -52,8 +52,15 @@ module TagRunes
|
|
52
52
|
# ensure tags appear on each line of a multiline log statement.
|
53
53
|
module MultilineFormatter
|
54
54
|
|
55
|
+
# Completed 200 OK in 244ms (Views: 78.9ms | ActiveRecord: 52.1ms)
|
56
|
+
COMPLETED_RE = /\ACompleted \d\d\d \w/
|
57
|
+
|
55
58
|
def call(severity, timestamp, progname, msg)
|
56
|
-
if msg &&
|
59
|
+
if msg && COMPLETED_RE.match(msg) && !Rails.env.development?
|
60
|
+
# keep requests separated when deployed for sanity's sake
|
61
|
+
[super, super(severity, timestamp, progname, '')].join
|
62
|
+
elsif msg && msg.index("\n")
|
63
|
+
# apply the tags to each line via the underlying log tagger
|
57
64
|
msg.lines.map{|l| super(severity, timestamp, progname, l.chomp)}.join
|
58
65
|
else
|
59
66
|
super
|
@@ -66,16 +73,7 @@ module TagRunes
|
|
66
73
|
# Hook Rails init process
|
67
74
|
class Railtie < Rails::Railtie
|
68
75
|
initializer 'outland-tag_runes' do |app|
|
69
|
-
|
70
76
|
Rails.logger.formatter.extend MultilineFormatter
|
71
|
-
|
72
|
-
# Keep requests separated when deployed for sanity's sake
|
73
|
-
unless Rails.env.development?
|
74
|
-
ActiveSupport::Notifications.subscribe('process_action.action_controller') do |_|
|
75
|
-
Rails.logger.info "\n"
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
77
|
end
|
80
78
|
end
|
81
79
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: outland-tag_runes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Lipa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|