little_log_friend 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +1 -1
- data/{README.rdoc → README.md} +50 -21
- data/lib/little_log_friend/version.rb +2 -2
- metadata +40 -64
data/LICENSE.txt
CHANGED
data/{README.rdoc → README.md}
RENAMED
@@ -1,36 +1,61 @@
|
|
1
|
-
|
1
|
+
### LittleLogFriend is no longer actively maintained in favour to: [Yell - Your Extensible Logging Library](https://github.com/rudionrails/yell)
|
2
|
+
|
3
|
+
Although it is still a good replacement for Ruby's standard Logger in the
|
4
|
+
smaller scale, you might want to take a look at [Yell](https://github.com/rudionrails/yell),
|
5
|
+
or jump directly into the [Wiki](https://github.com/rudionrails/yell/wiki),
|
6
|
+
for a logging solution with some extra whiz-bang!
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
# LittleLogFriend
|
2
12
|
|
3
13
|
LittleLogFriend sets your standard logger to a more readable format, like so:
|
4
14
|
|
15
|
+
```ruby
|
5
16
|
logger = Logger.new STDOUT
|
17
|
+
|
6
18
|
logger.info 'hello world'
|
7
|
-
|
19
|
+
#=> 2009-01-14 10:10:10 [ INFO] 15356 : hello world
|
20
|
+
```
|
8
21
|
|
9
22
|
The format is: DATE TIME [ LOG LEVEL ] PID : MESSAGE
|
10
23
|
|
11
24
|
|
12
|
-
|
13
|
-
|
25
|
+
## Installation
|
26
|
+
|
27
|
+
### The Gem Version
|
28
|
+
|
29
|
+
System wide:
|
14
30
|
|
15
|
-
|
31
|
+
```console
|
32
|
+
gem install little_log_friend
|
33
|
+
```
|
16
34
|
|
17
35
|
Or in your Gemfile:
|
18
36
|
|
19
|
-
|
37
|
+
```ruby
|
38
|
+
gem 'little_log_friend'
|
39
|
+
```
|
20
40
|
|
21
41
|
You should create an initializer file in order to get LittleLogFriend to work for you, like so:
|
22
|
-
# config/initializers/little_log_friend.rb (create it if not present)
|
23
|
-
require 'little_log_friend
|
24
42
|
|
43
|
+
```ruby
|
44
|
+
# config/initializers/little_log_friend.rb (create it if not present)
|
45
|
+
require 'little_log_friend
|
46
|
+
```
|
25
47
|
|
26
|
-
=== The Plugin Version
|
27
48
|
|
28
|
-
|
49
|
+
### The Plugin Version
|
50
|
+
|
51
|
+
```console
|
52
|
+
script/plugin install git://github.com/rudionrails/little_log_friend.git
|
53
|
+
```
|
29
54
|
|
30
55
|
You don't need to specifically require little_log_friend, the init.rb of the plugin will take care of it.
|
31
56
|
|
32
|
-
|
33
|
-
|
57
|
+
|
58
|
+
## Usage
|
34
59
|
|
35
60
|
LittleLogFriend will automatically enhance your standard logger with a nicer
|
36
61
|
log formatting - nothing more. Instead of the regular format, you will see
|
@@ -42,29 +67,33 @@ a unified logging format will significantly ease this process.
|
|
42
67
|
|
43
68
|
Additionally to that, you can add this to your environment.rb:
|
44
69
|
|
70
|
+
```ruby
|
45
71
|
LittleLogFriend.colorize!
|
72
|
+
```
|
46
73
|
|
47
74
|
This will enable colorized log output (under Unix). Every log level will appear
|
48
75
|
in a different color to ease log interpretation. Here are the colors for each
|
49
76
|
severity:
|
50
77
|
|
51
|
-
debug
|
52
|
-
info
|
53
|
-
warn
|
54
|
-
error
|
55
|
-
fatal
|
56
|
-
unknown => white
|
57
|
-
default => default of the console / none
|
78
|
+
debug => green
|
79
|
+
info => white
|
80
|
+
warn => yello
|
81
|
+
error => red
|
82
|
+
fatal => purple
|
83
|
+
unknown => white
|
84
|
+
default => default of the console / none
|
58
85
|
|
59
86
|
|
60
87
|
Also, you can override the default color settings, like so:
|
61
88
|
|
89
|
+
```ruby
|
62
90
|
LittleLogFriend.colorize!( :info => "\033[01;36m" ) # cyan for Unix
|
91
|
+
```
|
63
92
|
|
64
93
|
Specify the keys as explained above for the default severity colors.
|
65
94
|
|
66
95
|
|
67
|
-
|
96
|
+
## Additional Notes
|
68
97
|
|
69
98
|
LittleLogFriend is not meant to be a fully featured log solution, but it's
|
70
99
|
supposed to help in the smaller scale and especially when developing.
|
@@ -74,4 +103,4 @@ will be very difficult to read the log file on a remote server with all the colo
|
|
74
103
|
information in it.
|
75
104
|
|
76
105
|
|
77
|
-
Copyright (c) 2009 -
|
106
|
+
Copyright (c) 2009 - 2012 Rudolf Schmidt, released under the MIT license
|
metadata
CHANGED
@@ -1,65 +1,49 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: little_log_friend
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 0
|
10
|
-
version: 0.2.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Rudolf Schmidt
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-03-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: rake
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70288033470340 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
33
22
|
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: activesupport
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: *70288033470340
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: activesupport
|
27
|
+
requirement: &70288033465720 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
|
-
requirements:
|
29
|
+
requirements:
|
41
30
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 121
|
44
|
-
segments:
|
45
|
-
- 2
|
46
|
-
- x
|
31
|
+
- !ruby/object:Gem::Version
|
47
32
|
version: 2.x
|
48
33
|
type: :development
|
49
|
-
|
50
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70288033465720
|
36
|
+
description: ! 'LittleLogFriend sets your standard logger to the format: "DATE TIME
|
37
|
+
[ LEVEL ] PID : MESSAGE"'
|
51
38
|
email:
|
52
39
|
executables: []
|
53
|
-
|
54
40
|
extensions: []
|
55
|
-
|
56
41
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
42
|
+
files:
|
59
43
|
- .gitignore
|
60
44
|
- Gemfile
|
61
45
|
- LICENSE.txt
|
62
|
-
- README.
|
46
|
+
- README.md
|
63
47
|
- Rakefile
|
64
48
|
- init.rb
|
65
49
|
- lib/little_log_friend.rb
|
@@ -68,39 +52,31 @@ files:
|
|
68
52
|
- little_log_friend.gemspec
|
69
53
|
- test/little_log_friend_test.rb
|
70
54
|
- test/test_helper.rb
|
71
|
-
has_rdoc: true
|
72
55
|
homepage: http://github.com/rudionrails/little_log_friend
|
73
56
|
licenses: []
|
74
|
-
|
75
57
|
post_install_message:
|
76
58
|
rdoc_options: []
|
77
|
-
|
78
|
-
require_paths:
|
59
|
+
require_paths:
|
79
60
|
- lib
|
80
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
62
|
none: false
|
82
|
-
requirements:
|
83
|
-
- -
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
|
86
|
-
|
87
|
-
- 0
|
88
|
-
version: "0"
|
89
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ! '>='
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
68
|
none: false
|
91
|
-
requirements:
|
92
|
-
- -
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
|
95
|
-
segments:
|
96
|
-
- 0
|
97
|
-
version: "0"
|
69
|
+
requirements:
|
70
|
+
- - ! '>='
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
98
73
|
requirements: []
|
99
|
-
|
100
74
|
rubyforge_project: little_log_friend
|
101
|
-
rubygems_version: 1.
|
75
|
+
rubygems_version: 1.8.17
|
102
76
|
signing_key:
|
103
77
|
specification_version: 3
|
104
78
|
summary: An easy way to set your Ruby standard logger to a more readable format
|
105
|
-
test_files:
|
106
|
-
|
79
|
+
test_files:
|
80
|
+
- test/little_log_friend_test.rb
|
81
|
+
- test/test_helper.rb
|
82
|
+
has_rdoc:
|