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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db053f077481fd1eea04044cfec8ffa8ae2f6da8
|
4
|
+
data.tar.gz: bfa135f2dac8a1661873c525fe13b3722b9f197d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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, :
|
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
|
-
|
69
|
-
rescue
|
74
|
+
logentries.write(data)
|
75
|
+
rescue
|
70
76
|
close_connection
|
71
|
-
|
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 )
|
data/logentries-logging.gemspec
CHANGED
@@ -1,19 +1,18 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "logentries-logging"
|
3
|
-
s.version =
|
3
|
+
s.version = '0.0.5'
|
4
4
|
|
5
|
-
s.authors = [
|
5
|
+
s.authors = ['Eric Nicholas', 'Kyle VanderBeek']
|
6
6
|
s.require_paths = ["lib"]
|
7
|
-
s.date =
|
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
|
+
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-
|
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.
|
43
|
+
rubygems_version: 2.2.3
|
44
44
|
signing_key:
|
45
45
|
specification_version: 4
|
46
46
|
summary: appender for logging to logentries
|