colored_logger 0.0.4 → 0.0.5
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/README.md +14 -1
- data/colored_logger.gemspec +2 -2
- data/lib/colored_logger/version.rb +1 -1
- data/lib/colored_logger.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 583593fd330777fc01f7a2b33275f4c08eb37517
|
|
4
|
+
data.tar.gz: d9e0f09ebcf1e7a48a42018e863ffe12dbf08f54
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5f78f540b7288a0db122b2f8f1c386639b74133d1b2d5a53796ef28e15c584360ef87df18b55ef8ea7f66b7907bc05b9be9bff916319ef05efdecbde1e8ff7fd
|
|
7
|
+
data.tar.gz: f0cfc52a2377a743db9f7cefab1c54e057ca719dff79e81d4a7fefc612f52a799cb51d2e7d2fd2b1027429cebf4b8e59038484b2d888d0f042975cf7fb5c50b1
|
data/README.md
CHANGED
|
@@ -18,7 +18,20 @@ Or install it yourself as:
|
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Add color to any logger output using `Rails.logger.<debug|info|warn|error|fatal|unknown> "I am a string".<black|red|green|yellow|blue|magenta|cyan|white>`
|
|
22
|
+
|
|
23
|
+
Right now the colors for the logger severity are hardcoded but I will update soon. As of now they are
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
{'DEBUG'=>'0;37;45', 'INFO'=>'32', 'WARN'=>'33', 'ERROR'=>'31', 'FATAL'=>'31', 'UNKNOWN'=>'37'}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Coming Soon
|
|
30
|
+
|
|
31
|
+
* Inverse colors/background
|
|
32
|
+
* Custom Severities
|
|
33
|
+
* Tagged Logs
|
|
34
|
+
|
|
22
35
|
|
|
23
36
|
## Contributing
|
|
24
37
|
|
data/colored_logger.gemspec
CHANGED
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.version = ColoredLogger::VERSION
|
|
9
9
|
spec.authors = ["Lawrence Norton"]
|
|
10
10
|
spec.email = ["lawrence@lawrencenorton.com"]
|
|
11
|
-
spec.summary = %q{
|
|
12
|
-
spec.description = ""
|
|
11
|
+
spec.summary = %q{A rails logger formatter & colorizer}
|
|
12
|
+
spec.description = "Better formatting and color for your logger "
|
|
13
13
|
spec.homepage = "https://github.com/lawrence79/colored_logger"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
data/lib/colored_logger.rb
CHANGED
|
@@ -7,7 +7,7 @@ module ColoredLogger
|
|
|
7
7
|
class ActiveSupport::Logger::SimpleFormatter
|
|
8
8
|
SEVERITY_TO_TAG_MAP = {'DEBUG'=>'nom', 'INFO'=>'fyi', 'WARN'=>'hmm', 'ERROR'=>'wtf', 'FATAL'=>'omg', 'UNKNOWN'=>'???'}
|
|
9
9
|
SEVERITY_TO_COLOR_MAP = {'DEBUG'=>'0;37;45', 'INFO'=>'32', 'WARN'=>'33', 'ERROR'=>'31', 'FATAL'=>'31', 'UNKNOWN'=>'37'}
|
|
10
|
-
USE_HUMOROUS_SEVERITIES =
|
|
10
|
+
USE_HUMOROUS_SEVERITIES = false
|
|
11
11
|
|
|
12
12
|
def call(severity, time, progname, msg)
|
|
13
13
|
if USE_HUMOROUS_SEVERITIES
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: colored_logger
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lawrence Norton
|
|
@@ -52,7 +52,7 @@ dependencies:
|
|
|
52
52
|
- - ~>
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: 4.0.0
|
|
55
|
-
description: ''
|
|
55
|
+
description: 'Better formatting and color for your logger '
|
|
56
56
|
email:
|
|
57
57
|
- lawrence@lawrencenorton.com
|
|
58
58
|
executables: []
|
|
@@ -92,5 +92,5 @@ rubyforge_project:
|
|
|
92
92
|
rubygems_version: 2.0.6
|
|
93
93
|
signing_key:
|
|
94
94
|
specification_version: 4
|
|
95
|
-
summary:
|
|
95
|
+
summary: A rails logger formatter & colorizer
|
|
96
96
|
test_files: []
|