pretty_logger 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pretty_logger/pretty_logger.rb +30 -0
- data/lib/pretty_logger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495230861ba7c527043c10ae1ce1151faaeae4b15d9ca84682d62362b782815a
|
4
|
+
data.tar.gz: f4e36270962d8452c0bc6631979dd62b5bcf7bd3497a9f36d047a4c5d7da151a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3bd7e311cab0ba85d1360500a71d6b7baf2071c56940454fd989935c185b6a7efc472f3daa03e6c067e6c936183ae1b6112b27d5f0562f33669b02e6ffc830c
|
7
|
+
data.tar.gz: 73ad8ab4706909d3c4f4da8539871904f90da38613b0d788beefce0e55d9365856659daac0e1762c05f327552a13d2576a2e349b30659369cb86c92fb8e4a212
|
@@ -35,6 +35,10 @@ module PrettyLogger
|
|
35
35
|
instance.send(level || :info, "\e[90m#{timestamp}#{level_indicator}\e[0m#{message}")
|
36
36
|
end
|
37
37
|
|
38
|
+
def log(*messages)
|
39
|
+
pretty_log(nil, *messages)
|
40
|
+
end
|
41
|
+
|
38
42
|
def debug(*messages)
|
39
43
|
pretty_log(:debug, *messages)
|
40
44
|
end
|
@@ -89,6 +93,32 @@ module PrettyLogger
|
|
89
93
|
}
|
90
94
|
end
|
91
95
|
|
96
|
+
def ansi_colors
|
97
|
+
# timestamp: `light_black`
|
98
|
+
# url: `white`
|
99
|
+
# hashkeys: `cyan`
|
100
|
+
# strings: `green`
|
101
|
+
# light_ colors don't work for bg in tmux
|
102
|
+
{
|
103
|
+
black: 30,
|
104
|
+
light_black: 90,
|
105
|
+
red: 31,
|
106
|
+
light_red: 91,
|
107
|
+
green: 32,
|
108
|
+
light_green: 92,
|
109
|
+
yellow: 33,
|
110
|
+
light_yellow: 93,
|
111
|
+
blue: 34,
|
112
|
+
light_blue: 94,
|
113
|
+
magenta: 35,
|
114
|
+
light_magenta: 95,
|
115
|
+
cyan: 36,
|
116
|
+
light_cyan: 96,
|
117
|
+
white: 37,
|
118
|
+
light_white: 97,
|
119
|
+
}
|
120
|
+
end
|
121
|
+
|
92
122
|
def focused_backtrace(trace)
|
93
123
|
return [] unless trace
|
94
124
|
trace.select { |line|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pretty_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rocco Nicholls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coderay
|