services 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/services/logger/redis.rb +3 -3
- data/lib/services/version.rb +1 -1
- data/spec/services/logger/redis_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7004c57ec38e0a50c485274eb889a7d86eb3604
|
4
|
+
data.tar.gz: 8d2295ec5857505fffdb5bbf1a745ff5b3cdc505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c79defb87ccc2c3f4b6b52e91273248de62c5c38853912299d240a0949d05571beb51032c8c30e6bbcd169d8ef63e5b73a0d20c13dd5091c7f34769029dc941
|
7
|
+
data.tar.gz: 377da1dd477a4a80a5bd9f3ab0175b5389969fa2e9d5a7f8a9e7469bc00aa77da31adb102d932b92bb8db26d24b8b1f49f9ac2e2cc3960c7482e70efff16273e
|
data/CHANGELOG.md
CHANGED
@@ -8,9 +8,9 @@ module Services
|
|
8
8
|
def log(message, meta = {}, severity = :info)
|
9
9
|
value = {
|
10
10
|
time: Time.now.to_i,
|
11
|
-
message: message,
|
12
|
-
severity: severity,
|
13
|
-
meta: meta
|
11
|
+
message: message.to_s,
|
12
|
+
severity: severity.to_s,
|
13
|
+
meta: meta.map { |k, v| [k.to_s, v.to_s] }.to_h
|
14
14
|
}
|
15
15
|
@redis.lpush @key, value.to_json
|
16
16
|
end
|
data/lib/services/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Services::Logger::Redis do
|
4
|
-
let(:meta) { { foo: 'bar' } }
|
4
|
+
let(:meta) { { foo: 'bar', class: Services::Base, object: redis } }
|
5
5
|
let(:message) { "One day baby we'll be old" }
|
6
6
|
let(:severity) { 'critical' }
|
7
7
|
let(:key) { 'custom_log_key' }
|
@@ -30,7 +30,7 @@ describe Services::Logger::Redis do
|
|
30
30
|
'time' => Time.now.to_i,
|
31
31
|
'message' => message,
|
32
32
|
'severity' => severity,
|
33
|
-
'meta' => meta.
|
33
|
+
'meta' => meta.map { |k, v| [k.to_s, v.to_s] }.to_h
|
34
34
|
}
|
35
35
|
expect do
|
36
36
|
logger.log message, meta, severity
|