journald-logger 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/journald/modules/exceptionable.rb +2 -2
- data/lib/journald/modules/loggable.rb +20 -0
- data/lib/journald/modules/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a6633a93054cf7ae0e79093aa7d66f6f0b4de64
|
4
|
+
data.tar.gz: 6a3f691ecd2e530522e20cd37926883ddfee4e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa937e92e823a97889694c0f2c074fbc1c1ade2c2e2b84f81a3be86b302fc41ad3cc4013d775d6c2353a46abbc257547e36d934d53da2a0994db0dad21268ed2
|
7
|
+
data.tar.gz: fbe449d6afb7b74b22299eb61cacfcf4e6476d5a0b324386a2259ced9dbfcd36b1025485d69eba883334cefbfe8f2b4df111629aa1e1d7348bdfe3f53a92e662
|
@@ -15,7 +15,7 @@ module Journald
|
|
15
15
|
|
16
16
|
tag_trace_location(e.backtrace_locations[0]) if bt
|
17
17
|
|
18
|
-
send(
|
18
|
+
send(
|
19
19
|
priority: priority,
|
20
20
|
message: "Exception #{e.inspect}",
|
21
21
|
gem_logger_message_type: is_cause ? 'ExceptionCause' : 'Exception',
|
@@ -23,7 +23,7 @@ module Journald
|
|
23
23
|
exception_message: e.message,
|
24
24
|
backtrace: bt ? e.backtrace.join("\n"): nil,
|
25
25
|
cause: e.cause ? e.cause.inspect : nil,
|
26
|
-
|
26
|
+
)
|
27
27
|
|
28
28
|
untag_trace_location if bt
|
29
29
|
|
@@ -67,6 +67,26 @@ module Journald
|
|
67
67
|
self.min_priority = severity_to_priority(severity)
|
68
68
|
end
|
69
69
|
|
70
|
+
def silence(temporary_severity = nil, severity: nil, priority: nil)
|
71
|
+
prev_priority = self.min_priority
|
72
|
+
|
73
|
+
severity ||= temporary_severity
|
74
|
+
|
75
|
+
temp_priority = if priority
|
76
|
+
priority
|
77
|
+
elsif severity
|
78
|
+
severity_to_priority(severity)
|
79
|
+
else
|
80
|
+
LOG_ERR
|
81
|
+
end
|
82
|
+
|
83
|
+
self.min_priority = temp_priority
|
84
|
+
|
85
|
+
yield
|
86
|
+
|
87
|
+
self.min_priority = prev_priority
|
88
|
+
end
|
89
|
+
|
70
90
|
alias_method :sev_threshold, :level
|
71
91
|
alias_method :sev_threshold=, :level=
|
72
92
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: journald-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Smirnov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: journald-native
|
@@ -92,8 +92,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '0'
|
93
93
|
requirements: []
|
94
94
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.4.
|
95
|
+
rubygems_version: 2.4.6
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: systemd-journal native logger
|
99
99
|
test_files: []
|
100
|
+
has_rdoc:
|