logasm 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/logasm/adapters/logstash_adapter.rb +3 -1
- data/lib/logasm/adapters/stdout_adapter.rb +3 -1
- data/logasm.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 200640bf85d51b2e5a0624792740b9a3b4282b32
|
4
|
+
data.tar.gz: f957214552bdbdb5a6b0875e6937156a593de3a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d22edc2348903f4893b2f79dc8c34a34279280468d5c0ae96b5e3a6204cf0ca6b270929e2d80c61e2abda5705a019ac131769339741968d326002e110ed852d
|
7
|
+
data.tar.gz: 6f48d7208176093532f4d6773ea5488803099bad11ceb0e750248a0d0fa2d9b35bbc67322b80112ed816f96951ee427bc6c586bc9cfcfdaacb78b0f250124eef
|
data/Gemfile.lock
CHANGED
@@ -6,7 +6,9 @@ class Logasm
|
|
6
6
|
class LogstashAdapter
|
7
7
|
attr_reader :logger
|
8
8
|
|
9
|
-
def initialize(level, service,
|
9
|
+
def initialize(level, service, arguments = {})
|
10
|
+
host = arguments.fetch(:host)
|
11
|
+
port = arguments.fetch(:port)
|
10
12
|
device = UDPSocket.new.tap do |socket|
|
11
13
|
socket.connect(host, port)
|
12
14
|
end
|
@@ -8,7 +8,9 @@ class Logasm
|
|
8
8
|
@logger.level = level
|
9
9
|
end
|
10
10
|
|
11
|
-
def log(level,
|
11
|
+
def log(level, metadata = {})
|
12
|
+
message = metadata[:message]
|
13
|
+
metadata.delete(:message)
|
12
14
|
log_data = [message, metadata.empty? ? nil : metadata.to_json].compact.join(' ')
|
13
15
|
|
14
16
|
@logger.public_send level, log_data
|
data/logasm.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "logasm"
|
7
|
-
gem.version = '0.1.
|
7
|
+
gem.version = '0.1.1'
|
8
8
|
gem.authors = ["Salemove"]
|
9
9
|
gem.email = ["support@salemove.com"]
|
10
10
|
gem.description = %q{It's logasmic}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logasm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salemove
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-event
|