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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 583adf93c7847ddb950c5c735f953436418360e429b1dc32613d4e349b49f4f9
4
- data.tar.gz: 23992dcdfde8f6cd81a6a6ce9b701e57e363473c5cb0ab63ec0962b3a9a963a6
3
+ metadata.gz: 495230861ba7c527043c10ae1ce1151faaeae4b15d9ca84682d62362b782815a
4
+ data.tar.gz: f4e36270962d8452c0bc6631979dd62b5bcf7bd3497a9f36d047a4c5d7da151a
5
5
  SHA512:
6
- metadata.gz: 242b8ee0c11ada7ddc9138cb4e151decf0f94b4cdfecff26da7b899d70bc820e6669a26df2925bf8b02cade1b3dbb61fc9d9dd7a63a08f52e7805394e96f52a5
7
- data.tar.gz: ef2f2bc955619f9dd2fdbcda350282cc2bd0fca05016e1ee465333ff0c5792d4c2bf80749d6ea2ea34f4e3daa2d9b2b71ab7de3d84de0fee5a630d8c817071dc
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|
@@ -1,3 +1,3 @@
1
1
  module PrettyLogger
2
- VERSION = "1.4.5"
2
+ VERSION = "1.4.6"
3
3
  end
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.5
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-06-06 00:00:00.000000000 Z
11
+ date: 2024-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay