console 1.4.0 → 1.4.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: 1caef24154ecf1f0cbe36ce8dfbbaceec31a1be279ce244105ff5e3868e04e28
4
- data.tar.gz: 5c90b8b2f64ef76dccc1b7d37989ece807c2f636ef85e2d70344030884dab13e
3
+ metadata.gz: 34ccd1256430f59ae972ea3759afc6a804eab3178686fdbe094e4835477414bb
4
+ data.tar.gz: 6c9a306c59fa29b4fa93a71002977a159a89fb00cc3e07a51a92f4ceb91ee706
5
5
  SHA512:
6
- metadata.gz: 881fbf9a24669cf5287045c4a750c84f596fdb433047d4a1246503b060bd80441332d319eba0479b5a6ffc89e6eb6341e09c82fe8df4afc3a87537f63fb55733
7
- data.tar.gz: e2cf4fcca144be6ebd9f5842a6fa44b077e7a603c0c29e23b80fd745ce83fedc9132e9e0dc3bdf72e52c80eb75dd8147b1bdf60d44b5fb0edd3c2c8c6fe85f72
6
+ metadata.gz: 45b0209e1e0c69399fcafd519f6bc4f6913c2ea3df8afeea63b18a1ef6277b754c161be6d0bb4e2f75ea6358cd63a9063baeb42b8e0195cc231e9abae2e07b25
7
+ data.tar.gz: 03c0d291a39afc46f44bb19e81d3285cf0f5764ecdd4e1f66121d7d503219ff9bd5b0a15c3acac63e5835ecfdf0376cb27f29724b3c7d835dfdda7b9a5dd9d2c
@@ -0,0 +1,6 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = tab
5
+ indent_size = 2
6
+
data/README.md CHANGED
@@ -75,6 +75,26 @@ end
75
75
  MyObject.new.test_logger
76
76
  ```
77
77
 
78
+ ### Subject Logging
79
+
80
+ The first argument to the log method is the subject.
81
+
82
+ ```ruby
83
+ class Thing
84
+ def call
85
+ Console.logger.info(self) {"Something is going on"}
86
+ end
87
+ end
88
+ ```
89
+
90
+ Using this approach, you can turn on and off specific subjects by using the class name:
91
+
92
+ ```ruby
93
+ $ CONSOLE_DEBUG=Thing ./script.rb
94
+ ```
95
+
96
+ This will conditionally enable all log statements which have a subject of class `Thing`.
97
+
78
98
  ### Console Formatting
79
99
 
80
100
  Console classes are used to wrap data which can generate structured log messages:
@@ -139,8 +139,8 @@ module Console
139
139
  @subjects.delete(subject)
140
140
  end
141
141
 
142
- def call(*arguments, &block)
143
- @output.call(*arguments, &block)
142
+ def call(*arguments, **options, &block)
143
+ @output.call(*arguments, **options, &block)
144
144
  end
145
145
  end
146
146
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Console
22
- VERSION = "1.4.0"
22
+ VERSION = "1.4.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-22 00:00:00.000000000 Z
11
+ date: 2019-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: covered
@@ -73,6 +73,7 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
+ - ".editorconfig"
76
77
  - ".gitignore"
77
78
  - ".rspec"
78
79
  - ".travis.yml"
@@ -116,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  - !ruby/object:Gem::Version
117
118
  version: '0'
118
119
  requirements: []
119
- rubygems_version: 3.0.3
120
+ rubygems_version: 3.0.4
120
121
  signing_key:
121
122
  specification_version: 4
122
123
  summary: Beautiful logging for Ruby.