fluent-plugin-heroku-syslog 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45464deb9237a40a07e441e968af9c5b70fa3bce
4
- data.tar.gz: e4308639e7ccb688d490d81f6e2d47ff11b125fa
3
+ metadata.gz: 8fda7f03af14938c52ed30002041598a76bc8f48
4
+ data.tar.gz: 078503e361326e41b5dfc7b7a82ada1d175ab916
5
5
  SHA512:
6
- metadata.gz: 7f5051f8e44f95e6f6597e9a6c2c3be526396c0bf97e146d0d310d857f2d4676b524636209cb2b1df00376f44779fc1d6569547de5ec91320438b3cbb7432bc1
7
- data.tar.gz: a2037e66e3937285987c138091a7959e16e807ad328120d81d61a9f794d47c5a0dcd58b5d359a33ab98ce27eca09647294060e7d1b6d763b7ab60433f16edb48
6
+ metadata.gz: 83b39b23227d358265b58af6c60a5a0a5752a13cd5f0fb98bcad0b104e9f5e83bd1dcfd9f8f747cf96c33c5aee3d6b608604602f61ab3a837c2974bdf166b9dd
7
+ data.tar.gz: ddcfcaa801dbf3cdbe7398473d020a4e6af9936c4c67066c5eb5947a37228a8a7a426e92b0ea6121fb143f30c7c30befa4f98dc8a081174be09416a35c700725
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |gem|
3
3
  gem.name = "fluent-plugin-heroku-syslog"
4
- gem.version = "0.1.0"
4
+ gem.version = "0.1.1"
5
5
  gem.authors = ["Kazuyuki Honda"]
6
6
  gem.email = ["hakobera@gmail.com"]
7
7
  gem.description = %q{fluent plugin to drain heroku syslog}
@@ -6,7 +6,7 @@ module Fluent
6
6
  Plugin.register_input('heroku_syslog_http', self)
7
7
  include Logplex
8
8
 
9
- config_param :format, :string, :default => SYSLOG_REGEXP
9
+ config_param :format, :string, :default => SYSLOG_HTTP_REGEXP
10
10
  config_param :drain_ids, :array, :default => nil
11
11
 
12
12
  private
@@ -1,6 +1,7 @@
1
1
  module Fluent
2
2
  module Logplex
3
3
  SYSLOG_REGEXP = '/^([0-9]+)\\s+\\<(?<pri>[0-9]+)\\>[0-9]* (?<time>[^ ]*) (?<drain_id>[^ ]*) (?<ident>[a-zA-Z0-9_\\/\\.\\-]*) (?<pid>[a-zA-Z0-9\\.]+)? *(?<message>.*)$/'
4
+ SYSLOG_HTTP_REGEXP = '/^([0-9]+)\\s+\\<(?<pri>[0-9]+)\\>[0-9]* (?<time>[^ ]*) (?<drain_id>[^ ]*) (?<ident>[a-zA-Z0-9_\\/\\.\\-]*) (?<pid>[a-zA-Z0-9\\.]+)? *- *(?<message>.*)$/'
4
5
 
5
6
  FACILITY_MAP = {
6
7
  0 => 'kern',
@@ -31,12 +31,12 @@ class HerokuSyslogHttpInputTest < Test::Unit::TestCase
31
31
 
32
32
  tests = [
33
33
  {
34
- 'msg' => "<13>1 2014-01-29T06:25:52.589365+00:00 host app web.1 foo",
34
+ 'msg' => "<13>1 2014-01-29T06:25:52.589365+00:00 host app web.1 - foo",
35
35
  'expected' => 'foo',
36
36
  'expected_time' => Time.strptime('2014-01-29T06:25:52+00:00', '%Y-%m-%dT%H:%M:%S%z').to_i
37
37
  },
38
38
  {
39
- 'msg' => "<13>1 2014-01-30T07:35:00.123456+09:00 host app web.1 bar",
39
+ 'msg' => "<13>1 2014-01-30T07:35:00.123456+09:00 host app web.1 - bar",
40
40
  'expected' => 'bar',
41
41
  'expected_time' => Time.strptime('2014-01-30T07:35:00+09:00', '%Y-%m-%dT%H:%M:%S%z').to_i
42
42
  }
@@ -146,12 +146,12 @@ class HerokuSyslogHttpInputTest < Test::Unit::TestCase
146
146
  # actual syslog message has "\n"
147
147
  msgs = [
148
148
  {
149
- 'msg' => '<13>1 2014-01-01T01:23:45.123456+00:00 host app web.1 ' + 'x' * 100,
149
+ 'msg' => '<13>1 2014-01-01T01:23:45.123456+00:00 host app web.1 - ' + 'x' * 100,
150
150
  'expected' => 'x' * 100,
151
151
  'expected_time' => Time.parse("2014-01-01T01:23:45 UTC").to_i
152
152
  },
153
153
  {
154
- 'msg' => '<13>1 2014-01-01T01:23:45.123456+00:00 host app web.1 ' + 'x' * 1024,
154
+ 'msg' => '<13>1 2014-01-01T01:23:45.123456+00:00 host app web.1 - ' + 'x' * 1024,
155
155
  'expected' => 'x' * 1024,
156
156
  'expected_time' => Time.parse("2014-01-01T01:23:45 UTC").to_i
157
157
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-heroku-syslog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuyuki Honda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-03 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd