evt-log 0.5.0.0 → 0.5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/log/filter.rb +4 -0
- data/lib/log/format.rb +16 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb86e203c364fba2883aecb5550afb68cafd0e85b0ace908e88022acf214560b
|
4
|
+
data.tar.gz: aea017040fe5e881d2a2e4ab241acf493bf9db1e1ec7f1e097e45fcc0383a085
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb6b43807b64e8a7dd260019bd4acd7a4b813f53f0642aa9f987a158741185f71d93d8e69b5e5cdc98a4879d79e8f803b23773253275be5629ed18da5422fd33
|
7
|
+
data.tar.gz: 0e006cd4429f4adf79b495fdf576e0547eb91d9cafc617ae206028e9c8365f250b808b4fba257e4a665ce1f97fee9cbf10c90bd94d143bee3592ce9adbc8de8a
|
data/lib/log/filter.rb
CHANGED
data/lib/log/format.rb
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
class Log
|
2
2
|
module Format
|
3
3
|
def self.line(message, time, subject, level, device, &message_formatter)
|
4
|
-
|
4
|
+
header = nil
|
5
|
+
if Defaults.header == :on
|
6
|
+
header = "#{header(time, subject, level, device)} "
|
7
|
+
end
|
8
|
+
|
9
|
+
"#{header}#{message(message, device, &message_formatter)}"
|
5
10
|
end
|
6
11
|
|
7
12
|
def self.message(message, device, &message_formatter)
|
@@ -26,6 +31,16 @@ class Log
|
|
26
31
|
def self.message_formatter
|
27
32
|
proc {|message| message }
|
28
33
|
end
|
34
|
+
|
35
|
+
def self.header
|
36
|
+
env_header = ENV['LOG_HEADER']
|
37
|
+
|
38
|
+
if env_header.nil?
|
39
|
+
env_header = :on
|
40
|
+
end
|
41
|
+
|
42
|
+
env_header.to_sym
|
43
|
+
end
|
29
44
|
end
|
30
45
|
end
|
31
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-log
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-initializer
|