structured-event-logger 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/.travis.yml +5 -1
- data/Gemfile +8 -2
- data/README.md +2 -0
- data/lib/structured_event_logger/json_writer.rb +1 -2
- data/lib/structured_event_logger/syslogger.rb +1 -2
- data/lib/structured_event_logger/version.rb +1 -1
- data/structured-event-logger.gemspec +2 -3
- data/test/structured_event_logger_test.rb +1 -1
- metadata +7 -21
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmU4NDMwODM2MTNjN2ZjYTUzODZkMTAzY2FhNDc4NGEyNzQ4N2M0YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
OWIyYTgxYzBkMjg2YzAxOGVkMDI4ZDg1Y2NmZDk5NmFhYmM4ZmVhMw==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjExM2UxMDFiNTYzODMyZTNmNjJkNDgyNWE5MWNmOTk5MDBmMDI2NDVlYjhm
|
10
|
+
ZWQyNmVlZjM0OTQzZmIyZGM0ZDM4OGE2YjAxZGIzODRjMmYwMjhhNGEzOTgy
|
11
|
+
NTExZjBkMDgxYWUxZGQ0YjU3ODU5ZjI2NzQzYWY4ZTFjZWE5ZDY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzE3MzQ4YTI0N2Q5YTY4ZTNlN2I1YTk3MzM3NWY0NjIzMTA2YmEwODkzNmJi
|
14
|
+
NzhkMWU4Yzc4OTVmMDY1Y2JmODMwYTNjZTBjMzlhYmJlNDMxYTAxNzJlY2Vj
|
15
|
+
Yjc5ZWYwODhmMjI3NTkxZWJlYTYxYTM5OWUzNjY4MDdkYzlhNWM=
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# StructuredEventLogger
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/Shopify/structured-event-logger.png?branch=master)](https://travis-ci.org/Shopify/structured-event-logger)
|
4
|
+
|
3
5
|
Structured event logger that submits events to a list of listeners, including
|
4
6
|
human readable logs, json formatted event streams, and other endpoints.
|
5
7
|
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'multi_json'
|
2
1
|
require 'active_support/json'
|
3
2
|
|
4
3
|
class StructuredEventLogger::JsonWriter
|
@@ -10,6 +9,6 @@ class StructuredEventLogger::JsonWriter
|
|
10
9
|
end
|
11
10
|
|
12
11
|
def call(scope, event, hash, record)
|
13
|
-
io.write(
|
12
|
+
io.write(ActiveSupport::JSON.encode(record) + "\n")
|
14
13
|
end
|
15
14
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'multi_json'
|
2
1
|
require 'active_support/json'
|
3
2
|
require 'syslog'
|
4
3
|
|
@@ -13,7 +12,7 @@ class StructuredEventLogger::Syslogger
|
|
13
12
|
end
|
14
13
|
|
15
14
|
def call(scope, event, hash, record)
|
16
|
-
message =
|
15
|
+
message = ActiveSupport::JSON.encode(record)
|
17
16
|
raise MessageExceedsMaximumSize, "Event too big to be submitted to syslog" if message.bytesize > max_size
|
18
17
|
Syslog.log(log_level, '%s', message)
|
19
18
|
end
|
@@ -18,11 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency "activesupport", "
|
22
|
-
spec.add_runtime_dependency "multi_json"
|
21
|
+
spec.add_runtime_dependency "activesupport", ">= 3.2"
|
23
22
|
|
24
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
24
|
spec.add_development_dependency "rake"
|
26
|
-
spec.add_development_dependency "minitest", "~>
|
25
|
+
spec.add_development_dependency "minitest", "~> 4.2"
|
27
26
|
spec.add_development_dependency "mocha", "~> 0.14"
|
28
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: structured-event-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emilie Noel
|
@@ -11,36 +11,22 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-12-
|
14
|
+
date: 2013-12-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activesupport
|
18
|
-
requirement: !ruby/object:Gem::Requirement
|
19
|
-
requirements:
|
20
|
-
- - ~>
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '3.2'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3.2'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: multi_json
|
32
18
|
requirement: !ruby/object:Gem::Requirement
|
33
19
|
requirements:
|
34
20
|
- - ! '>='
|
35
21
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
22
|
+
version: '3.2'
|
37
23
|
type: :runtime
|
38
24
|
prerelease: false
|
39
25
|
version_requirements: !ruby/object:Gem::Requirement
|
40
26
|
requirements:
|
41
27
|
- - ! '>='
|
42
28
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
29
|
+
version: '3.2'
|
44
30
|
- !ruby/object:Gem::Dependency
|
45
31
|
name: bundler
|
46
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,14 +61,14 @@ dependencies:
|
|
75
61
|
requirements:
|
76
62
|
- - ~>
|
77
63
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
64
|
+
version: '4.2'
|
79
65
|
type: :development
|
80
66
|
prerelease: false
|
81
67
|
version_requirements: !ruby/object:Gem::Requirement
|
82
68
|
requirements:
|
83
69
|
- - ~>
|
84
70
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
71
|
+
version: '4.2'
|
86
72
|
- !ruby/object:Gem::Dependency
|
87
73
|
name: mocha
|
88
74
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
125
|
version: '0'
|
140
126
|
requirements: []
|
141
127
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.1.4
|
143
129
|
signing_key:
|
144
130
|
specification_version: 4
|
145
131
|
summary: Structured event logger that writes events to both a human readable log and
|