eventhub-components 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/eventhub/components/logger.rb +6 -3
- data/lib/eventhub/components/version.rb +1 -1
- data/spec/components/multi_logger_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d45be3a6617176a8ef103375ab9f9dd890c03d2d42b18b7807f70dacf8b0ca77
|
4
|
+
data.tar.gz: a37a882428f4da50230fbc6cd50eff5bcfd92a84ca20339cee1de5afcf55abed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad92bc759f7269ac1aed64f7e326e795033947495d3b85cefe135896f18d3fd4712cc9ac10e84d92c89a74de81c0bed3fa0a2e79fc8726cce1c6a2fa22a0d8c8
|
7
|
+
data.tar.gz: e84d5cc265c6de87df7ab0de29b5f975f5008a2cfe1b2a9a57a8185f169f0c33502983e0744e1f6dc6622b8b76f0d66f681351d0dc7cd2ac50a48965355d4e62
|
data/CHANGELOG.md
CHANGED
@@ -24,11 +24,14 @@ class EventHub::Components::Logger
|
|
24
24
|
LogStashLogger.configure do |config|
|
25
25
|
config.customize_event do |event|
|
26
26
|
# renaming default fields to be eventhub cloud compatible
|
27
|
-
event["time"] = event.
|
27
|
+
event["time"] = event.timestamp.iso8601(6)
|
28
28
|
event["msg"] = event.remove("message")
|
29
29
|
event["level"] = event.remove("severity")
|
30
|
-
event["host"] = event.remove("host") # reordering
|
31
|
-
|
30
|
+
event["host"] = event.remove("host") # for reordering
|
31
|
+
|
32
|
+
# to be removed or replaced
|
33
|
+
event.remove("@version")
|
34
|
+
event.remove("@timestamp")
|
32
35
|
|
33
36
|
# additional fields
|
34
37
|
event["app"] = processor_name
|
@@ -62,7 +62,7 @@ RSpec.describe EventHub::Components::StructuredDataLogger do
|
|
62
62
|
end
|
63
63
|
|
64
64
|
it "logs json to standard output" do
|
65
|
-
pattern = /\{"time":"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{
|
65
|
+
pattern = /\{"time":"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+\d{2}:\d{2}","msg":"hello","level":"(INFO|WARN|ERROR|DEBUG|FATAL)","host":"[^\"]+","app":"processor","env":"development"\}/
|
66
66
|
|
67
67
|
logger.add_device(EventHub::Components::Logger.logstash_cloud("processor", "development"))
|
68
68
|
expect { logger.info("hello") }.to output(pattern).to_stdout_from_any_process
|