sw-logger 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/lib/sw/log_formatter/json_formatter.rb +1 -1
- data/lib/sw/logger/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9647fe84a634e2cefbffb5afdb257032ba714570d9b2010dfe39a100d1a6c0f
|
4
|
+
data.tar.gz: dabd8cab20f851310d5c2d32ddd5ac807ac20c26d6756ed756bdcb399b61569d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0479a993266ed0088274c5411117c9662ac9f9bb8674606d3232be6a6d254e71cfc800ceacee576e08b0fca53d7c117d672e3b204bb64aec34d430536e7bf54e'
|
7
|
+
data.tar.gz: 783d66cd6d15cda5ae11db4eecbcf12c846f5eb3ff5541e7e5f6e770d8aa5273cae0deaa1652745d3c89e24f93cda283a849e0976b5f26dfa720f9f1e9453314
|
data/Gemfile.lock
CHANGED
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
|
data/lib/sw/logger/version.rb
CHANGED
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.
|
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-
|
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.
|
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.
|