cogger 0.22.0 → 0.23.0
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
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +2 -2
- data/cogger.gemspec +2 -2
- data/lib/cogger/configuration.rb +7 -1
- data/lib/cogger/entry.rb +1 -1
- data/lib/cogger/hub.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 206ff070eb7f86523ea8ce73f13b12ca5eaa8e13d81d8adf389e69d984193d7d
|
|
4
|
+
data.tar.gz: 5445cfff99f24c1af2fed78cc741ef0c469718c80fa54c5a4c1dff99069085f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fbbae623ca9b520bbe356f9fa37f35b1e3520b66e4deebeae2bc4d8dc8700ffa08531efde1c7db5ac49a37a428544ea1430b032594e90eed44ac006c1016a111
|
|
7
|
+
data.tar.gz: 6c2a1e66c79d661e4131fb2a14d20984fcf945dac6746efd010043b7eaa4c62c69a1a451681cba7da531e8042639de0cc685ec46e92601820f2762c3f99585cd
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/README.adoc
CHANGED
|
@@ -625,7 +625,7 @@ There is no restriction on what dependency you might want to initialize your cus
|
|
|
625
625
|
|
|
626
626
|
=== Tags
|
|
627
627
|
|
|
628
|
-
Tags allow you to tag your messages at both a global and local (i.e. per message) level. For example, here's
|
|
628
|
+
Tags allow you to tag your messages at both a global and local (i.e. per message) level. For example, here's a single global tag:
|
|
629
629
|
|
|
630
630
|
[source,ruby]
|
|
631
631
|
----
|
|
@@ -635,7 +635,7 @@ logger.info "Demo"
|
|
|
635
635
|
# 🟢 [console] [WEB] Demo
|
|
636
636
|
----
|
|
637
637
|
|
|
638
|
-
|
|
638
|
+
You can use multiple tags as well:
|
|
639
639
|
|
|
640
640
|
[source,ruby]
|
|
641
641
|
----
|
data/cogger.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "cogger"
|
|
5
|
-
spec.version = "0.
|
|
5
|
+
spec.version = "0.23.0"
|
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
|
8
8
|
spec.homepage = "https://alchemists.io/projects/cogger"
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
|
|
25
25
|
spec.required_ruby_version = "~> 3.3"
|
|
26
26
|
spec.add_dependency "core", "~> 1.0"
|
|
27
|
-
spec.add_dependency "refinements", "~> 12.
|
|
27
|
+
spec.add_dependency "refinements", "~> 12.7"
|
|
28
28
|
spec.add_dependency "tone", "~> 1.0"
|
|
29
29
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
|
30
30
|
|
data/lib/cogger/configuration.rb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require "core"
|
|
4
4
|
require "logger"
|
|
5
|
+
require "refinements/array"
|
|
5
6
|
|
|
6
7
|
module Cogger
|
|
7
8
|
# Defines the default configuration for all pipes.
|
|
@@ -18,6 +19,8 @@ module Cogger
|
|
|
18
19
|
:entry,
|
|
19
20
|
:logger
|
|
20
21
|
) do
|
|
22
|
+
using Refinements::Array
|
|
23
|
+
|
|
21
24
|
def initialize id: Program.call,
|
|
22
25
|
io: $stdout,
|
|
23
26
|
level: Level.call,
|
|
@@ -29,9 +32,12 @@ module Cogger
|
|
|
29
32
|
suffix: "%Y-%m-%d",
|
|
30
33
|
entry: Entry,
|
|
31
34
|
logger: Logger
|
|
32
|
-
|
|
35
|
+
|
|
36
|
+
super.tap { tags.freeze }
|
|
33
37
|
end
|
|
34
38
|
|
|
39
|
+
def entag(other = nil) = other ? tags.including(other) : tags
|
|
40
|
+
|
|
35
41
|
def to_logger
|
|
36
42
|
logger.new io,
|
|
37
43
|
age,
|
data/lib/cogger/entry.rb
CHANGED
data/lib/cogger/hub.rb
CHANGED
|
@@ -12,8 +12,8 @@ module Cogger
|
|
|
12
12
|
class Hub
|
|
13
13
|
extend Forwardable
|
|
14
14
|
|
|
15
|
-
using Refinements::Logger
|
|
16
15
|
using Refinements::Hash
|
|
16
|
+
using Refinements::Logger
|
|
17
17
|
|
|
18
18
|
delegate %i[
|
|
19
19
|
close
|
|
@@ -105,7 +105,7 @@ module Cogger
|
|
|
105
105
|
message,
|
|
106
106
|
id: configuration.id,
|
|
107
107
|
level:,
|
|
108
|
-
tags: configuration.
|
|
108
|
+
tags: configuration.entag(payload.delete(:tags)),
|
|
109
109
|
**payload,
|
|
110
110
|
&
|
|
111
111
|
)
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cogger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.23.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brooke Kuhlmann
|
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date: 2024-
|
|
38
|
+
date: 2024-08-16 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: core
|
|
@@ -57,14 +57,14 @@ dependencies:
|
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '12.
|
|
60
|
+
version: '12.7'
|
|
61
61
|
type: :runtime
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '12.
|
|
67
|
+
version: '12.7'
|
|
68
68
|
- !ruby/object:Gem::Dependency
|
|
69
69
|
name: tone
|
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
155
155
|
- !ruby/object:Gem::Version
|
|
156
156
|
version: '0'
|
|
157
157
|
requirements: []
|
|
158
|
-
rubygems_version: 3.5.
|
|
158
|
+
rubygems_version: 3.5.17
|
|
159
159
|
signing_key:
|
|
160
160
|
specification_version: 4
|
|
161
161
|
summary: A customizable and feature rich logger.
|
metadata.gz.sig
CHANGED
|
Binary file
|