extended_logger 0.6.2 → 0.6.3

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
  SHA1:
3
- metadata.gz: 97bbe77f301024495da9528d5ec193c89894f76b
4
- data.tar.gz: d196a15033648b6e914d7a1c6b418448cb9210e4
3
+ metadata.gz: 5f704fdee2a7eb383aa5cb2d3a9be31eec5771e7
4
+ data.tar.gz: 254c1e8950e8d6a6b04a2c667874b08e843fcde6
5
5
  SHA512:
6
- metadata.gz: 0c4dfec6925dd532ca2213c796f8a144583bb3c44a8b25037d8adffc8b8a21fb2f0535d64f0d0d684a254a3f3186e1e4fb9155f651e9b27f04798e9f8e9ff971
7
- data.tar.gz: 1b764005965e5ddb5e604c775b03629c302a09829f7ddde4b89f986e9f4f2e37a805bd4646683bef0c3114801c3ba62bccad25c7f5a4c927d57ee7e14563b9ef
6
+ metadata.gz: f74eafcc745d45528526abec4303c3a73bfff27d39e2682c7d3e7c87511c096e662bf0e7e515e4865b69674a804b715d27900f21d2da2170c0ce93428bdb1c68
7
+ data.tar.gz: 4e2eac9a4fd0b39f8bfa5b9926d6d2eecd0c5e76613531d649801807c2c86e6344da9a6cc292279e62c19c1d68052291819bd9b3910fbc6107beec047d63d65c
@@ -79,6 +79,16 @@ class ExtendedLogger
79
79
  instance
80
80
  end
81
81
 
82
+ class Color < ExtendedLogger.define Levels::Set.example, :color_scheme => ColorSchemes.example, :format => Formatters::Plain.example
83
+ def self.example
84
+ device = StringIO.new
85
+
86
+ instance = build device
87
+ instance.clock = Time::Clock
88
+ instance
89
+ end
90
+ end
91
+
82
92
  class Ruby < ExtendedLogger.define
83
93
  def self.example
84
94
  device = StringIO.new
@@ -18,7 +18,10 @@ class ExtendedLogger
18
18
  device = File.open device, 'a+' if device.is_a? String
19
19
  device.sync = true
20
20
 
21
- color_scheme = nil unless device.is_a? StringIO or device.tty?
21
+ if color_scheme == :none or not (device.tty? and device.is_a? StringIO)
22
+ color_scheme = nil
23
+ end
24
+
22
25
  serializer = Serializer.build log_format: format, color_scheme: color_scheme
23
26
 
24
27
  instance = new device, levels, serializer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extended_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Ladd