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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTA4MzBhODEyODA5ZDMwYmE1ZmU1NmYyZTVkYTI2YWY3NGYyY2EyOA==
4
+ NmU4NDMwODM2MTNjN2ZjYTUzODZkMTAzY2FhNDc4NGEyNzQ4N2M0YQ==
5
5
  data.tar.gz: !binary |-
6
- YmE3YzRlYTg0ZTQwZTg4NDYxZjBiZjQzYzU1ZDY4YzkwNjA3NGIzOA==
7
- !binary "U0hBNTEy":
6
+ OWIyYTgxYzBkMjg2YzAxOGVkMDI4ZDg1Y2NmZDk5NmFhYmM4ZmVhMw==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- ODRjZTg4ZTBkZmRlMWYyNjE3ODFkYjgzNWFhYzU1ZTc1YTZhMDc2Y2UxNTkz
10
- NDhkYzkyZDg4YjhhNzFhZDBkZDM3NDJiNGZlMGZmMjUzNDIyNzk1YmY5NTFh
11
- OTkzM2M2OTgwYjJiYjQxOTEzZGZhM2U4MzdlYmQ1ZDk0NTlmMDk=
9
+ ZjExM2UxMDFiNTYzODMyZTNmNjJkNDgyNWE5MWNmOTk5MDBmMDI2NDVlYjhm
10
+ ZWQyNmVlZjM0OTQzZmIyZGM0ZDM4OGE2YjAxZGIzODRjMmYwMjhhNGEzOTgy
11
+ NTExZjBkMDgxYWUxZGQ0YjU3ODU5ZjI2NzQzYWY4ZTFjZWE5ZDY=
12
12
  data.tar.gz: !binary |-
13
- Njk0MTI3MzI3ODBjMGE5MDA1ODM1OTdkNzgzY2NhMjk4MmE4ZGY4ZjQyZTM5
14
- Yzg0OWM3MzMzZWM1MjY5MTdhMzM2YWM5NDVjZDI1NGM4NWNlOGI4MWM0ZTY0
15
- YmZhNmI5YjIyN2ZjNWI3ODIyZWJiMGJlMTAzN2M2ZDZjMjAxNjU=
13
+ NzE3MzQ4YTI0N2Q5YTY4ZTNlN2I1YTk3MzM3NWY0NjIzMTA2YmEwODkzNmJi
14
+ NzhkMWU4Yzc4OTVmMDY1Y2JmODMwYTNjZTBjMzlhYmJlNDMxYTAxNzJlY2Vj
15
+ Yjc5ZWYwODhmMjI3NTkxZWJlYTYxYTM5OWUzNjY4MDdkYzlhNWM=
@@ -4,8 +4,12 @@ rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
6
  - ruby-head
7
- - rbx-19mode
7
+ - rbx
8
8
  - jruby-19mode
9
+ env:
10
+ - "AS_VERSION=3.2.16"
11
+ - "AS_VERSION=4.0.2"
9
12
  matrix:
10
13
  allow_failures:
11
14
  - rvm: ruby-head
15
+ fast_finish: true
data/Gemfile CHANGED
@@ -1,4 +1,10 @@
1
1
  source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in structured-event-logger.gemspec
4
2
  gemspec
3
+
4
+ version = ENV["AS_VERSION"] || "3.2.16"
5
+ gem "activesupport", "~> #{version}"
6
+
7
+ platform :rbx do
8
+ gem "rubysl"
9
+ gem "json"
10
+ end
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(MultiJson.encode(record) + "\n")
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 = MultiJson.encode(record)
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
@@ -1,3 +1,3 @@
1
1
  class StructuredEventLogger
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  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", "~> 3.2"
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", "~> 5.0"
25
+ spec.add_development_dependency "minitest", "~> 4.2"
27
26
  spec.add_development_dependency "mocha", "~> 0.14"
28
27
  end
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
  require 'stringio'
3
3
 
4
- class StructuredEventLoggerTest < Minitest::Test
4
+ class StructuredEventLoggerTest < MiniTest::Unit::TestCase
5
5
  def setup
6
6
  ActiveSupport::LogSubscriber.colorize_logging = false
7
7
 
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.3
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-04 00:00:00.000000000 Z
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: '0'
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: '0'
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: '5.0'
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: '5.0'
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.0.7
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