customlogger 0.0.7 → 0.0.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f5f7376a8fb97ecabaaf83af4a1b420dab2d10c
4
- data.tar.gz: a9e5b66a81cb53694838014c00063f7bd9154fc5
3
+ metadata.gz: b83205247923c4adfe9f0a6ab7b3ddd6247b130e
4
+ data.tar.gz: 991b7b21198ef829b72355c040b135a4230f56d1
5
5
  SHA512:
6
- metadata.gz: 7243e52d452bb48ea8caff457db812a00f1a8b83c97e45b7fb7b6f6c358fa614e5c78b4aa8f7e7ac8f5b51175acb421885a925b12b876983ff02d4a56232c393
7
- data.tar.gz: 7fbc3e0f5c8693b1c71eeabd2137c8ab45fce47b153b829e05d30381066c131be48ce6f982a459628d58ff2e3f03fdb7f10ee44b4b9c9bd64c7553e3cbb605ae
6
+ metadata.gz: 5cd3178688ffad3d178bbb0934ebaab9053d803c841ef3da32cc838d47508ce3e499f8a3ca065fca5bb168643ee0fd1b32217067a30c24c84f52d44a887c0942
7
+ data.tar.gz: dcf6f31edfbef2a63f71a2a404515145b2441fc5a91445eb7b7dd2f4d11c7aa668e54f72429a6cf188bd7a222f4ca59752a5374c248473e4ac1f1dbb78d84792
data/README.md CHANGED
@@ -23,7 +23,7 @@ group :development, :test do
23
23
  [...]
24
24
  end
25
25
  ```
26
- Keep in mind that "[...]" means that there may or may not have other gems there.
26
+ Keep in mind that "[...]" means that there may or may not be other gems there.
27
27
 
28
28
  And then execute:
29
29
 
@@ -36,7 +36,8 @@ Or install it yourself as:
36
36
  ## Usage
37
37
 
38
38
  Custom Logger is very easy to use. Just use the module 'CustomLogger' anywhere
39
- and log the message in a nice friendly colorful html page view. Take a look
39
+ and log the message in a nice friendly colorful html page view. All the logging
40
+ follows pattern of message input first followed by optional title. Take a look
40
41
  at the examples below.
41
42
 
42
43
  ![Example Screenshot](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/all.png)
@@ -46,6 +47,7 @@ at the examples below.
46
47
  CustomLogger.error 'This is an error message'
47
48
  CustomLogger.error = 'This is an error message'
48
49
  CustomLogger.error 'This is an error message', 'Error Title'
50
+ CustomLogger.error('This is an error message', 'Error Title')
49
51
 
50
52
  ![Error Screenshot](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/error.png)
51
53
 
@@ -54,6 +56,7 @@ at the examples below.
54
56
  CustomLogger.warning 'This is a warning message'
55
57
  CustomLogger.warning = 'This is a warning message'
56
58
  CustomLogger.warning 'This is a warning message', 'Warning Title'
59
+ CustomLogger.warning('This is a warning message', 'Warning Title')
57
60
 
58
61
  ![Warning Screenshot](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/warning.png)
59
62
 
@@ -62,6 +65,7 @@ at the examples below.
62
65
  CustomLogger.debug 'This is a debug message'
63
66
  CustomLogger.debug = 'This is a debug message'
64
67
  CustomLogger.debug 'This is a debug message', 'Debug Title'
68
+ CustomLogger.debug('This is a debug message', 'Debug Title')
65
69
 
66
70
  ![Debug Screenshot](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/debug.png)
67
71
 
@@ -70,6 +74,7 @@ at the examples below.
70
74
  CustomLogger.info 'This is an info message'
71
75
  CustomLogger.info = 'This is an info message'
72
76
  CustomLogger.info 'This is an info message', 'Info Title'
77
+ CustomLogger.info('This is an info message', 'Info Title')
73
78
 
74
79
  ![Info Screenshot](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/info.png)
75
80
 
@@ -82,9 +87,19 @@ will see. Basically it is inside of a 'pre' html tag.
82
87
  CustomLogger.raw 'This is a raw message'
83
88
  CustomLogger.raw = 'This is a raw message'
84
89
  CustomLogger.raw 'This is a raw message', 'Raw Title'
90
+ CustomLogger.raw('This is a raw message', 'Raw Title')
85
91
 
86
92
  ![Raw Screenshot](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/raw.png)
87
93
 
94
+ #### ActiveRecord Support
95
+
96
+ CustomLogger supports ActiveRecord if you use ActiveRecord. To log ActiveRecord
97
+ just use raw logger. For an example:
98
+
99
+ CustomLogger.raw(User.first, 'This is User.first')
100
+
101
+ ![ActiveRecord Log](https://raw.githubusercontent.com/SaimonL/repo-assets/master/customlogger/active_record.png)
102
+
88
103
  #### New Line
89
104
 
90
105
  If you want to add a gap in-between sets of outputs then this is what you are
data/lib/customlogger.rb CHANGED
@@ -110,7 +110,7 @@ module CustomLogger
110
110
  def set_error_colors
111
111
  @error_colors = {
112
112
  error: '#8b0000', warning: '#6d422e',
113
- debug: '#2d5a2e', info: '#31708f'
113
+ debug: '#ececec', info: '#285b75'
114
114
  }
115
115
  end
116
116
 
@@ -36,7 +36,7 @@ class HTMLTemplate
36
36
  font-family: monospace, monospace, serif;
37
37
  font-size: 0.9em;
38
38
  color: #{error_colors[:warning]};
39
- background-color: #faebcc;
39
+ background-color: #ffeedc;
40
40
  border-color: #b4a48a;
41
41
  padding: 8px;
42
42
  border: 1px solid #b4a48a;
@@ -60,7 +60,7 @@ class HTMLTemplate
60
60
  font-family: monospace, monospace, serif;
61
61
  font-size: 0.9em;
62
62
  color: #{error_colors[:debug]};
63
- background-color: #eafbe2;
63
+ background-color: #f8fbe2;
64
64
  border-color: #bbcbad;
65
65
  padding: 8px;
66
66
  border: 1px solid #bbcbad;
@@ -1,3 +1,3 @@
1
1
  module Customlogger
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -38,22 +38,22 @@ describe 'with Custom Logger' do
38
38
  describe 'with error colors' do
39
39
  it 'will have default error colors' do
40
40
  expect( CustomLogger.error_colors
41
- ).to eq ({ error: '#8b0000', warning: '#6d422e', debug: '#2d5a2e',
42
- info: '#31708f' })
41
+ ).to eq ({ error: '#8b0000', warning: '#6d422e', debug: '#ececec',
42
+ info: '#285b75' })
43
43
  end
44
44
 
45
45
  it 'will allow to set error color' do
46
46
  CustomLogger.error_color(:error, 'lovell')
47
47
  expect( CustomLogger.error_colors
48
- ).to eq ({ error: 'lovell', warning: '#6d422e', debug: '#2d5a2e',
49
- info: '#31708f' })
48
+ ).to eq ({ error: 'lovell', warning: '#6d422e', debug: '#ececec',
49
+ info: '#285b75' })
50
50
  end
51
51
 
52
52
  it 'will allow to set warning color' do
53
53
  CustomLogger.error_color(:warning, 'slovell')
54
54
  expect( CustomLogger.error_colors
55
- ).to eq ({ error: 'lovell', warning: 'slovell', debug: '#2d5a2e',
56
- info: '#31708f' })
55
+ ).to eq ({ error: 'lovell', warning: 'slovell', debug: '#ececec',
56
+ info: '#285b75' })
57
57
  end
58
58
 
59
59
  it 'will allow to set debug color' do
@@ -61,7 +61,7 @@ describe 'with Custom Logger' do
61
61
  expect( CustomLogger.error_colors
62
62
 
63
63
  ).to eq ({ error: 'lovell', warning: 'slovell', debug: 'saimon',
64
- info: '#31708f' })
64
+ info: '#285b75' })
65
65
  end
66
66
 
67
67
  it 'will allow to set debug color' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: customlogger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saimon Lovell