exception_notification_fluent_logger_notifier 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15d287fcdff1fdb7af6f120ee51a4bee21d69b21
|
4
|
+
data.tar.gz: 3033d8cb36c428ecaeed35c9c0ab211267056cba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fac582ba8da3cb5a062b46fd56faf9e6a7e187a96bf4890f4723f22ded6ad099b07e3ec13461420a0bd62870663817f96b4b0e7da9a77996463e1ab0069a2cf4
|
7
|
+
data.tar.gz: 1ec0af391a3d600a65b244406a358a53fc7557158e5066dd2efb13e41a45b281de2753ef042d41c7df267483a4ab12b1194ad674a75440879498f47e5e446930
|
data/README.md
CHANGED
@@ -20,8 +20,11 @@ Or install it yourself as:
|
|
20
20
|
## Usage
|
21
21
|
|
22
22
|
As other exception notifiers, add settings at the environments.
|
23
|
-
|
24
|
-
Key `
|
23
|
+
|
24
|
+
* Key `tag_prefix` is for the fluentd tag.
|
25
|
+
* Key `template` is for setting log format and must be Hash.
|
26
|
+
* Key `logger_settings` is for settings of the logger instance.
|
27
|
+
* If key `test_logger` is `true`, the notifier use `Fluent::Logger::TestLogger` instead of `FluentLogger`.
|
25
28
|
|
26
29
|
See also [exception_notifier's doc](http://smartinez87.github.io/exception_notification/#notifiers).
|
27
30
|
|
@@ -31,7 +34,11 @@ See also [exception_notifier's doc](http://smartinez87.github.io/exception_notif
|
|
31
34
|
Whatever::Application.config.middleware.use ExceptionNotification::Rack,
|
32
35
|
:fluent_logger => {
|
33
36
|
:tag_prefix => "exceptions",
|
34
|
-
:
|
37
|
+
:logger_settings => {
|
38
|
+
:host => "localhost",
|
39
|
+
:port => 8888,
|
40
|
+
}
|
41
|
+
:template => {
|
35
42
|
exception_class: ->(exception, options) { exception.class_name },
|
36
43
|
exception_message: -> (exception, options) { exception.messaage },
|
37
44
|
}
|
@@ -10,6 +10,10 @@ describe ExceptionNotifier::FluentLoggerNotifier do
|
|
10
10
|
let(:notifier) do
|
11
11
|
ExceptionNotifier::FluentLoggerNotifier.new(
|
12
12
|
test_logger: true,
|
13
|
+
logger_settings: {
|
14
|
+
:host => "localhost",
|
15
|
+
:port => 8888,
|
16
|
+
},
|
13
17
|
template: {
|
14
18
|
message: ->(exception, options) { "Exception: #{exception.class}: #{exception.message}" }
|
15
19
|
}
|