sw-logger 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 281f87d8270bf0e0fd23fa654ac1efec5c0c2214698b852eed450a67062f0d51
4
- data.tar.gz: 2e47d4c7beeab382fdbf9b5e7e4103f07f7a48b7e327a3d4b14c0875e0974df7
3
+ metadata.gz: e9647fe84a634e2cefbffb5afdb257032ba714570d9b2010dfe39a100d1a6c0f
4
+ data.tar.gz: dabd8cab20f851310d5c2d32ddd5ac807ac20c26d6756ed756bdcb399b61569d
5
5
  SHA512:
6
- metadata.gz: 1772953120523bc0cf0392065fbd1619ed5b70efc416bc427bf6494ef491349a19c3057bd809b7143ddbd3e4203482e2dad717b2db13852d73f21d1df39eb2c8
7
- data.tar.gz: 39fe02021d4d5878c0b298d082adb93dc66545ced9f1ab6353387052040528c0873fa5ec803dab789b9f8ff01e88e54f7874bdebf542127da192bb980db04d09
6
+ metadata.gz: '0479a993266ed0088274c5411117c9662ac9f9bb8674606d3232be6a6d254e71cfc800ceacee576e08b0fca53d7c117d672e3b204bb64aec34d430536e7bf54e'
7
+ data.tar.gz: 783d66cd6d15cda5ae11db4eecbcf12c846f5eb3ff5541e7e5f6e770d8aa5273cae0deaa1652745d3c89e24f93cda283a849e0976b5f26dfa720f9f1e9453314
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sw-logger (0.1.0)
4
+ sw-logger (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -47,6 +47,11 @@ logger.with_context(foo: { bar: 42 }) { |l| l.info("Use JSON instead!") }
47
47
  # you can go batshit crazy when using a json logger, anything that can be dumped to json is fair game
48
48
  Sw.json_logger(STDOUT).with_context(foo: { bar: 42 }) { |l| l.info("Oooh, yeah!") }
49
49
  # => {"bar":{"foo":42},"severity":"INFO","timestamp":"2020-01-31T11:27:34.848643","message":"Oooh, yeah!"}
50
+
51
+ # you can also chain tags and context,
52
+ # you also don't need to open a block for a single tagged / context enriched statement
53
+ logger.tagged("MyApp", "MyDomain").with_context(tenant: 42).info("Tags & Context apply only for this call.")
54
+ # => I, [2020-01-31T11:45:11.348817 #35215] INFO -- : [MyApp] [MyDomain] [tenant=42] Tags & Context apply only for this call.
50
55
  ```
51
56
 
52
57
  ## Development
@@ -17,7 +17,7 @@ module Sw
17
17
  timestamp: format_datetime(time),
18
18
  progName: progname,
19
19
  tags: tags,
20
- message: msg2str(msg)
20
+ message: msg
21
21
  )
22
22
 
23
23
  JSON.dump(remove_blank_values(payload)) + "\n"
@@ -4,6 +4,6 @@ require "logger"
4
4
 
5
5
  module Sw
6
6
  class Logger < ::Logger
7
- VERSION = "0.1.0"
7
+ VERSION = "0.1.1"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sw-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kai Kuchenbecker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-31 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Context enriched logging with plain and json format.
14
14
  email:
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubygems_version: 3.0.3
57
+ rubygems_version: 3.1.2
58
58
  signing_key:
59
59
  specification_version: 4
60
60
  summary: Context enriched logging with plain and json format.