logentries-logging 0.0.4 → 0.0.5

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: 4aa1be56131c441aba8a607fc521dc0435c267c4
4
- data.tar.gz: b94b253b02d7d7a2b6b3fc8191822d9d170797a2
3
+ metadata.gz: db053f077481fd1eea04044cfec8ffa8ae2f6da8
4
+ data.tar.gz: bfa135f2dac8a1661873c525fe13b3722b9f197d
5
5
  SHA512:
6
- metadata.gz: 156e1b0247f2124d4efdc98ded58aeb555d3614e911ea229163f649975b5d5b3069477dea4d8e8dd250062ea4aaa9a552787edfaeb0c44f24ec84ac8a6745eee
7
- data.tar.gz: a7a0f8947450f4d85b7f428c8d36f351ac16ded5876ce36cc9db160566d58a0e92ef8d75f3f1ccdfa4fddf1381a9f1ee54d6d4ad2ae42d82998c0491ebd481ea
6
+ metadata.gz: b543740b8a4c9ed6560f189e20517d304ca6cecb7cab0555ca2916deb99ba378f6bb44f890e0acba9c3d040bacabd724baeb9d0d7830a526fbb4c4091b31569a
7
+ data.tar.gz: 0ead1afa82883bf62f8472be0e1128d21d9e107b32bd4d68f17a7e7d47710a02fde7256b56866294b2001f099abf26ff80bf8b21b5cbcca3f645d5bcc50cc388
@@ -15,14 +15,13 @@ module Logging
15
15
  # Provides an appender that can send log messages to loggly
16
16
 
17
17
  class LogentriesLogging < ::Logging::Appender
18
- attr_accessor :token, :logentries, :levels
18
+ attr_accessor :token, :levels
19
19
  def initialize( name, opts = {} )
20
20
  opts[:header] = false
21
21
  super(name, opts)
22
22
  # customer token for logentries
23
23
  self.token = opts.fetch(:token)
24
24
  raise ArgumentError, 'Must specify token' if @token.nil?
25
- self.logentries = open_connection
26
25
  self.layout.items = %w(timestamp level logger message pid hostname thread_id mdc)
27
26
  self.levels = Logging::LEVELS.invert
28
27
  end
@@ -61,19 +60,21 @@ module Logging
61
60
  elsif @logentries.respond_to?(:close)
62
61
  @logentries.close
63
62
  end
63
+
64
+ @logentries = nil
65
+ end
66
+ alias_method :reopen, :close_connection
67
+
68
+ def logentries
69
+ @logentries ||= open_connection
64
70
  end
65
71
 
66
72
  def write(event)
67
73
  data = "#{@token} #{self.layout.format(event)} \n"
68
- @logentries.write(data)
69
- rescue TimeoutError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError
74
+ logentries.write(data)
75
+ rescue
70
76
  close_connection
71
- @logentries = open_connection
72
- @logentries.write(data)
73
- end
74
-
75
- def reopen
76
- @logentries = open_connection
77
+ logentries.write(data)
77
78
  end
78
79
 
79
80
  def close( *args )
@@ -3,7 +3,7 @@ module Logging
3
3
  module LogentriesLogging
4
4
  extend self
5
5
 
6
- VERSION = '1.0.0'.freeze
6
+ VERSION = '0.0.5'.freeze
7
7
 
8
8
  def initialize_logentries_logging
9
9
  require File.expand_path('../../appenders/logentries_logging', __FILE__)
@@ -1,19 +1,18 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "logentries-logging"
3
- s.version = "0.0.4"
3
+ s.version = '0.0.5'
4
4
 
5
- s.authors = ["Eric Nicholas"]
5
+ s.authors = ['Eric Nicholas', 'Kyle VanderBeek']
6
6
  s.require_paths = ["lib"]
7
- s.date = "2015-08-20"
7
+ s.date = '2015-12-11'
8
8
  s.description = "Appender for logging to logentries with logging gem"
9
9
  s.email = "eric@gametime.co"
10
10
  s.files = [
11
11
  "LICENSE",
12
12
  "logentries-logging.gemspec",
13
13
  "lib/logging/appenders/logentries_logging.rb",
14
- "lib/logging/plugins/logentries_logging.rb",
14
+ "lib/logging/plugins/logentries_logging.rb"
15
15
  ]
16
- s.license = 'MIT'
17
16
  s.homepage = "http://github.com/gametimesf/logentries-logging"
18
17
  s.summary = "appender for logging to logentries"
19
18
 
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logentries-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Nicholas
8
+ - Kyle VanderBeek
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-08-20 00:00:00.000000000 Z
12
+ date: 2015-12-11 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: Appender for logging to logentries with logging gem
14
15
  email: eric@gametime.co
@@ -21,8 +22,7 @@ files:
21
22
  - lib/logging/plugins/logentries_logging.rb
22
23
  - logentries-logging.gemspec
23
24
  homepage: http://github.com/gametimesf/logentries-logging
24
- licenses:
25
- - MIT
25
+ licenses: []
26
26
  metadata: {}
27
27
  post_install_message:
28
28
  rdoc_options: []
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.4.5.1
43
+ rubygems_version: 2.2.3
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: appender for logging to logentries