fluent-plugin-loggly 0.0.7 → 0.0.8

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: 65d0006313ddc9fcc95212520906f19f4a04d95e
4
- data.tar.gz: 81608d38ba31a5a3f18d79862cb91405fdf367a9
3
+ metadata.gz: 58ab421ae313e0e75e94e4db1827b83b40580e23
4
+ data.tar.gz: 628d63b13fbbf46e9c91efac3db6f4cf2b308899
5
5
  SHA512:
6
- metadata.gz: 97ef91d3eb063eb6b7be9e88761e8a357741440c8527ae1d907befe32b96b3c36e1d6fd2d33ebd0d81b0259c218eb724ebdf44e76f49611546bf131c0eb41774
7
- data.tar.gz: d57aedf80c60f487b1eced7af2a15e42adf4845a6f0a6a52896a2d5b34729871e27fff0314001574daae23e77c42a734b3a42c59468dd21f176b07fb590d27d4
6
+ metadata.gz: a8e7bb8154a222fcbc0386471640cff4d9282679d83869bc5cd95a65f17f5c2818d1cc2f0dad878855e5dd3e6322f52b3616811aed8fb3e6cb423da8564a6973
7
+ data.tar.gz: e8cfdad1887b207596beea0ba2180b100651bad73626506e0feb347941d4f258df28c59e8de265f09c655f7dd8fac80789985f0c0cdae15cff9643cca9584982
data/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  Loggly plugin for [Fluentd](http://www.fluentd.org)
2
2
  =============
3
+
4
+ [![Gem](https://img.shields.io/gem/dt/fluent-plugin-loggly.svg)](https://rubygems.org/gems/fluent-plugin-loggly)
5
+
3
6
  With fluent-plugin-loggly you will be able to use [Loggly](http://loggly.com) as output the logs you collect with Fluentd.
4
7
 
5
8
  ## Getting Started
6
9
  * Install [Fluentd](http://www.fluentd.org/download)
7
- * gem install fluent-plugin-loggly
10
+ * `gem install fluent-plugin-loggly` or if you are using the agent `td-agent-gem install fluent-plugin-loggly`
8
11
  * Make sure you have an account with Loggly.
9
12
  * Configure Fluentd as below:
10
13
  ~~~~~
@@ -19,6 +22,7 @@ or if you want to use buffered plugin:
19
22
  type loggly_buffered
20
23
  loggly_url https://logs-01.loggly.com/bulk/xxx-xxxx-xxxx-xxxxx-xxxxxxxxxx
21
24
  output_include_time true # add 'timestamp' record into log. (default: true)
25
+ time_precision_digits 3 # Include 3 digits of sub-second precision (default: 0)
22
26
  buffer_type file
23
27
  buffer_path /path/to/buffer/file
24
28
  flush_interval 10s
@@ -3,12 +3,13 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "fluent-plugin-loggly"
6
- s.version = "0.0.7"
6
+ s.version = "0.0.8"
7
7
  s.authors = ["Patrik Antonsson"]
8
8
  s.email = ["patant@gmail.com"]
9
9
  s.homepage = "https://github.com/patant/fluent-plugin-loggly"
10
10
  s.summary = %q{Fluentd plugin for output to loggly}
11
11
  s.description = %q{Fluentd pluging (fluentd.org) for output to loggly (loggly.com)}
12
+ s.license = "Apache-2.0"
12
13
 
13
14
  s.rubyforge_project = "fluent-plugin-loggly"
14
15
 
@@ -1,7 +1,7 @@
1
1
  module Fluent
2
2
  module Plugin
3
3
  module Loggly
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.8"
5
5
  end
6
6
  end
7
7
  end
@@ -25,6 +25,7 @@ class LogglyOutputBuffred < Fluent::BufferedOutput
25
25
  Fluent::Plugin.register_output('loggly_buffered', self)
26
26
  config_param :loggly_url, :string, :default => nil
27
27
  config_param :output_include_time, :bool, :default => true # Recommended
28
+ config_param :time_precision_digits, :integer, :default => 0
28
29
 
29
30
  unless method_defined?(:log)
30
31
  define_method("log") { $log }
@@ -48,13 +49,17 @@ class LogglyOutputBuffred < Fluent::BufferedOutput
48
49
  end
49
50
 
50
51
  def format(tag, time, record)
51
- [tag, time, record].to_msgpack
52
+ if time.is_a?(Integer)
53
+ [tag, time, record].to_msgpack
54
+ else
55
+ Fluent::Engine.msgpack_factory.packer.write([tag, time, record]).to_s
56
+ end
52
57
  end
53
58
 
54
59
  def write(chunk)
55
60
  records = []
56
61
  chunk.msgpack_each {|tag,time,record|
57
- record['timestamp'] ||= Time.at(time).iso8601 if @output_include_time
62
+ record['timestamp'] ||= Time.at(time).iso8601(@time_precision_digits) if @output_include_time
58
63
  records.push(Yajl::Encoder.encode(record))
59
64
  }
60
65
  $log.debug "#{records.length} records sent"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-loggly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Antonsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-09 00:00:00.000000000 Z
11
+ date: 2016-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-http-persistent
@@ -56,7 +56,8 @@ files:
56
56
  - lib/fluent/plugin/out_loggly.rb
57
57
  - lib/fluent/plugin/out_loggly_buffered.rb
58
58
  homepage: https://github.com/patant/fluent-plugin-loggly
59
- licenses: []
59
+ licenses:
60
+ - Apache-2.0
60
61
  metadata: {}
61
62
  post_install_message:
62
63
  rdoc_options: []