super_logger_rb 0.1.1 → 0.1.2
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/lib/super_logger.rb +17 -17
- data/lib/super_logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dcf0c519ef7e6b63d2be7c3420502434ec9a7a5
|
4
|
+
data.tar.gz: 3317853f87bc89ce6475e96aedb796256f077d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ead3ccac239772135afaa0155eb00c5d1687086ff4d6f7a9d367417bd1f822112087f02be11fa0200a4813ab7038b77b1e755016e7c19dea3d5823c56167ee6a
|
7
|
+
data.tar.gz: 0518e3b51bf1de17ab56057a06b7783bcd90085c6dfc2662244a2a7da5b00870157737c747b634776994e4f195fbf5ed8e659c81b8df2ad6edb9e179cb3ed89c
|
data/lib/super_logger.rb
CHANGED
@@ -7,29 +7,29 @@ module SuperLogger
|
|
7
7
|
Instance.new(*a)
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
10
|
+
module Color
|
11
|
+
def self.next
|
12
|
+
color_loop.next
|
13
|
+
end
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
end
|
15
|
+
def self.color_loop
|
16
|
+
@color_loop ||= Enumerator.new do |y|
|
17
|
+
loop do
|
18
|
+
colors.each { |c| y << c }
|
21
19
|
end
|
22
20
|
end
|
21
|
+
end
|
23
22
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
23
|
+
def self.colors
|
24
|
+
@colors ||= begin
|
25
|
+
colors = ColorizedString.colors.shuffle
|
26
|
+
colors.delete(:default)
|
27
|
+
colors
|
28
|
+
end
|
31
29
|
end
|
30
|
+
end
|
32
31
|
|
32
|
+
class Instance < Logger
|
33
33
|
def initialize(*a, prefix: nil, use_color: true)
|
34
34
|
super *a
|
35
35
|
@color = SuperLogger::Color.next if use_color
|
data/lib/super_logger/version.rb
CHANGED