logrb 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logrb.rb +10 -1
- data/lib/logrb/version.rb +1 -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: 0b5d74be8b8ba51716b2ac26aa49012a07cb7a89f294ed9d94603ecf1c5b1e66
|
4
|
+
data.tar.gz: 12ddcbf56cfdb6fd89c5476e04914be8aa5bb6dc3061a44cf7abbc3ff4fee454
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7f6030eb6a5fd71803f7076820751f1e6bb63b4e4669fae1d0aa0f235f8200e9468784abced5818e30f061cc04c9e9ccc251e7d7ae9e9691605020017b2df87
|
7
|
+
data.tar.gz: 21ee4e2c74e70fb53591ce7d1ad73c1f335a6d3b4d4e2c2c9537ef49b4bf1c7c9e82743cee1b85ec025d39e5c1936d38f59736264a6c63b14d95caef3b4cf02e
|
data/lib/logrb.rb
CHANGED
@@ -88,7 +88,7 @@ class Logrb
|
|
88
88
|
inst
|
89
89
|
end
|
90
90
|
|
91
|
-
LEVELS.except(:error).each_key do |name|
|
91
|
+
LEVELS.except(:error, :fatal).each_key do |name|
|
92
92
|
define_method(name) do |msg, **fields|
|
93
93
|
return if LEVELS[@level] > LEVELS[name]
|
94
94
|
|
@@ -106,6 +106,15 @@ class Logrb
|
|
106
106
|
nil
|
107
107
|
end
|
108
108
|
|
109
|
+
# Public: Emits a fatal message to the log output, and invokes Kernel#exit
|
110
|
+
# with a non-zero status code. When error is provided, this method attempts
|
111
|
+
# to gather a stacktrace to include in the emitted entry. This log entry
|
112
|
+
# cannot be filtered, and is always emitted.
|
113
|
+
def fatal(msg, error = nil, **fields)
|
114
|
+
wrap(:fatal, msg, error, fields)
|
115
|
+
exit 1
|
116
|
+
end
|
117
|
+
|
109
118
|
# Public: Dumps a given String or Array in the same format as `hexdump -C`.
|
110
119
|
def dump(log, data = nil, **fields)
|
111
120
|
return if LEVELS[@level] > LEVELS[:debug]
|
data/lib/logrb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Gama
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hexdump
|