logdna 0.0.2 → 0.0.3

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: 4f23d7547c0ad450d24da026d2372b7955d457d1
4
- data.tar.gz: abd18f8b965a7fd617041d0f0315240a6d948567
3
+ metadata.gz: db7ba5c409efbbabe822466d9b4d9349b2fb6a71
4
+ data.tar.gz: 7adca9e476db969193af213cda25cab8588e406c
5
5
  SHA512:
6
- metadata.gz: 7cf8461aaa9e54b156ee7d7546415c1d5207262d481b885a9fa6c01b7610b9e7a3d945709d7cf07dfa3e5425f6374598d8558db88952804dbb6c04c8bd83b34b
7
- data.tar.gz: faf14c530c39d75ebdfdcec9b928de573b820e138f7c2c38769c1bb420d32471bc6723a287aa1b4ba458c4dcf07997ba417db8070f1756d6ba2ddff71dc5dc69
6
+ metadata.gz: 359d9ee08dc0999fe8d243c7cd64cb22a83083ecc83e102872b0eaef530e4cbb85a4e1576e743ec4f367fa2c366cd2e363c06f36018e6fd8103fa1e4909ea7d8
7
+ data.tar.gz: f969a6da9b9c76389546fefb05da5b4ee093e48981aa421d273fad4c94d598e6654e70cdf27b3d352458705307bc9f0ed2f716ca075995fc896162f61d175021
data/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  # Overview
18
18
 
19
- This gem contains LogDNA::RubyLogger, an extension to the logger from Ruby's standard library, as well as LogDNA::RailsLogger, which inherits from ActiveSupport::Logger from Rails. LogDNA::RailsLogger is only loaded if ActiveSupport is present.
19
+ This gem contains LogDNA::RubyLogger, an extension to the logger from Ruby's standard library.
20
20
 
21
21
  # Installation
22
22
 
@@ -36,9 +36,7 @@ Or install it yourself as:
36
36
 
37
37
  # API
38
38
 
39
- ## Shared by LogDNA::RubyLogger and LogDNA::RailsLogger
40
-
41
- ### ::new(api_key, hostname, options = {})
39
+ ## ::new(api_key, hostname, options = {})
42
40
 
43
41
  Instantiates a new instance of the class it is called on. api_key and hostname are required.
44
42
 
@@ -51,21 +49,19 @@ Options:
51
49
  * mac: MAC address. Default: nil.
52
50
  * ip: IP address. Default: nil.
53
51
 
54
- ### \#add
52
+ ## \#add
55
53
 
56
54
  Log a message if the given severity is high enough and post it to the LogDNA ingester. This is the generic logging method. Users will be more inclined to use debug, info, warn, error, and fatal (which all call \#add), as [described in the Ruby Logger documentation](https://ruby-doc.org/stdlib-2.3.0/libdoc/logger/rdoc/Logger.html). Note that these methods take a source as the argument and a block which returns a message. It returns the http response.
57
55
 
58
- ### \#close_http
56
+ ## \#close_http
59
57
 
60
58
  Close the HTTP connection to LogDNA's ingester.
61
59
 
62
- ### \#reopen_http
60
+ ## \#reopen_http
63
61
 
64
62
  Open another HTTP connection to LogDNA's ingester if the connection is alread closed.
65
63
 
66
- ## Only in LogDNA::RubyLogger
67
-
68
- ### \#<<(message)
64
+ ## \#<<(message)
69
65
 
70
66
  Dump given message to the log device without any formatting, then posts it to the LogDNA ingester. If no log device exists, return nil.
71
67
 
@@ -75,7 +71,7 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
75
71
 
76
72
  # Contributing
77
73
 
78
- Bug reports and pull requests are welcome on GitHub at https://github.com/logdna/logdna_ruby.
74
+ Bug reports and pull requests are welcome on GitHub at https://github.com/logdna/ruby.
79
75
 
80
76
  # License
81
77
 
data/lib/logdna.rb CHANGED
@@ -1,10 +1,6 @@
1
1
  require 'json'
2
2
  require_relative './logdna/version.rb'
3
3
  require_relative './logdna/ruby_logger.rb'
4
- begin
5
- require_relative './logdna/rails_logger.rb'
6
- rescue
7
- end
8
4
 
9
5
  module LogDNA
10
6
  INGESTER_DOMAIN = 'https://logs.logdna.com'.freeze
@@ -1,3 +1,3 @@
1
1
  module LogDNA
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
data/logdna.gemspec CHANGED
@@ -6,8 +6,8 @@ require 'logdna/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'logdna'
8
8
  spec.version = LogDNA::VERSION
9
- spec.authors = ['edwin-lai']
10
- spec.email = ['edwinlai@ucla.edu']
9
+ spec.authors = 'Edwin Lai'
10
+ spec.email = 'edwin@logdna.com'
11
11
 
12
12
  spec.summary = 'LogDNA extension to ruby logger'
13
13
  spec.homepage = 'https://github.com/logdna/logdna_ruby'
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_runtime_dependency 'http', '~> 2.0', '>= 2.0.3'
23
+ spec.add_runtime_dependency 'http', '~> 2.0'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 1.13'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logdna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
- - edwin-lai
7
+ - Edwin Lai
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 2.0.3
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '2.0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 2.0.3
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: bundler
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -87,8 +81,7 @@ dependencies:
87
81
  - !ruby/object:Gem::Version
88
82
  version: '2.1'
89
83
  description:
90
- email:
91
- - edwinlai@ucla.edu
84
+ email: edwin@logdna.com
92
85
  executables: []
93
86
  extensions: []
94
87
  extra_rdoc_files: []
@@ -102,7 +95,6 @@ files:
102
95
  - bin/console
103
96
  - bin/setup
104
97
  - lib/logdna.rb
105
- - lib/logdna/rails_logger.rb
106
98
  - lib/logdna/ruby_logger.rb
107
99
  - lib/logdna/version.rb
108
100
  - logdna.gemspec
@@ -1,15 +0,0 @@
1
- require 'active_support/logger'
2
- require 'http'
3
-
4
- module LogDNA
5
- class RailsLogger < ActiveSupport::Logger
6
- include LogDNA
7
-
8
- def initialize(api_key, hostname, options = {})
9
- @conn = HTTP.persistent LogDNA::INGESTER_DOMAIN
10
- opts = fill_opts_with_defaults(options)
11
- super(opts[:logdev], opts[:shift_age], opts[:shift_size])
12
- set_ivars(api_key, hostname, options)
13
- end
14
- end
15
- end