logger-logging 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logger/logging/colored_logger.rb +6 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2715dddd09be9273911ce809178b1005e1316ebf
|
4
|
+
data.tar.gz: 3a986841694875c941e3fe3ce9e8704d6b21d604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a439dc9d9f2b1faba53c5deb3cc03b5868de5d76af9ff5c1d5ff7794699041ace356545bb8f4e38dc8317337c6641a52b6aff93a58559613e5fb3b6f2b60367
|
7
|
+
data.tar.gz: 6fedac0061944f7ed7cc5d00d70aed1d3c0e6d5af4dd8f52ca1adbd77a173b411946336bb62967bdc2ee18b2a6127215b456f9ced3b92a8ae77744e8d564b2bd
|
@@ -3,14 +3,14 @@ module Logger::Logging
|
|
3
3
|
ANSI_COLORS = %i(black red green yellow blue magenta cyan white)
|
4
4
|
|
5
5
|
DEFAULT_PALETTE = {
|
6
|
-
"ANY" => -> msg { bg(:blue, :
|
6
|
+
"ANY" => -> msg { bg(:blue, :normal, fg(:white, :bright, msg)) },
|
7
7
|
"FATAL" => -> msg { bg(:red, :bright, fg(:white, :bright, msg)) },
|
8
8
|
"ERROR" => -> msg { fg(:red, :bright, msg) },
|
9
|
-
"WARN" => -> msg { fg(:yellow, :
|
10
|
-
"INFO" => -> msg { fg(:
|
11
|
-
"DEBUG" => -> msg { fg(:
|
9
|
+
"WARN" => -> msg { fg(:yellow, :normal, msg) },
|
10
|
+
"INFO" => -> msg { fg(:green, :normal, msg) },
|
11
|
+
"DEBUG" => -> msg { fg(:blue, :normal, msg) },
|
12
12
|
"TRACE" => -> msg { fg(:magenta, :bright, msg) },
|
13
|
-
"DATA" => -> msg { fg(:
|
13
|
+
"DATA" => -> msg { fg(:cyan, :normal, msg) },
|
14
14
|
}
|
15
15
|
|
16
16
|
attr_writer :palette
|
@@ -23,7 +23,7 @@ module Logger::Logging
|
|
23
23
|
color_num = ANSI_COLORS.index color_code
|
24
24
|
intensity_num = { :normal => 0, :bright => 1 }.fetch intensity_code
|
25
25
|
fgbg_num = { :fg => 3, :bg => 4 }.fetch fgbg
|
26
|
-
"\e[#{fgbg_num}#{color_num}
|
26
|
+
"\e[#{intensity_num};#{fgbg_num}#{color_num}m#{str}\e[0m"
|
27
27
|
end
|
28
28
|
|
29
29
|
def fg *args
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logger-logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Ladd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Logging module that adds colored logging to any class and puts the class
|
14
14
|
name in the log output for easy grepping
|