my_stuff-logger 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +9 -0
- data/lib/my_stuff/logger/writer.rb +1 -1
- metadata +39 -20
data/README.rdoc
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
{<img src="https://secure.travis-ci.org/fredemmott/my_stuff-logger.png"
|
2
|
+
/>}[http://travis-ci.org/fredemmott/my_stuff-logger]
|
3
|
+
{<img src="https://gemnasium.com/fredemmott/my_stuff-logger.png"
|
4
|
+
/>}[https://gemnasium.com/fredemmott/my_stuff-logger]
|
5
|
+
|
1
6
|
= What is this?
|
2
7
|
|
3
8
|
A drop-in replacement for Ruby's standard Logger class, if you're just
|
@@ -36,6 +41,10 @@ There's per-app settings for where output goes, what levels are logged,
|
|
36
41
|
and what levels get backtraces — but you can also change this per-instance,
|
37
42
|
and it'll stick that way even if the global is changed later.
|
38
43
|
|
44
|
+
You can also change the defaults via environment variables:
|
45
|
+
* <tt>MYSTUFF_LOGLEVEL</tt>
|
46
|
+
* <tt>MYSTUFF_BTLEVEL</tt>
|
47
|
+
|
39
48
|
== You can plug in your own filters to make the log messages more readable.
|
40
49
|
|
41
50
|
A couple of examples:
|
@@ -36,7 +36,7 @@ module MyStuff
|
|
36
36
|
return if LEVELS[level] < LEVELS[self.level]
|
37
37
|
|
38
38
|
message = "%s %s @%s> %s\n" % [
|
39
|
-
level.to_s[0].upcase, # D|I|W|E|F
|
39
|
+
level.to_s[0,1].upcase, # D|I|W|E|F
|
40
40
|
Time.new.strftime("%s [%Y-%m-%d %H:%M:%S %z]"),
|
41
41
|
pretty_caller(outer_caller.first),
|
42
42
|
log_text(*args)
|
metadata
CHANGED
@@ -1,23 +1,33 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_stuff-logger
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Fred Emmott
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
17
|
+
|
18
|
+
date: 2012-01-22 00:00:00 Z
|
13
19
|
dependencies: []
|
14
|
-
|
15
|
-
|
20
|
+
|
21
|
+
description: ""
|
22
|
+
email:
|
16
23
|
- mail@fredemmott.co.uk
|
17
24
|
executables: []
|
25
|
+
|
18
26
|
extensions: []
|
27
|
+
|
19
28
|
extra_rdoc_files: []
|
20
|
-
|
29
|
+
|
30
|
+
files:
|
21
31
|
- COPYING
|
22
32
|
- README.rdoc
|
23
33
|
- example.rb
|
@@ -32,28 +42,37 @@ files:
|
|
32
42
|
- lib/my_stuff/logger/writer.rb
|
33
43
|
- lib/my_stuff/logger.rb
|
34
44
|
homepage: https://github.com/fredemmott/my_stuff-logger
|
35
|
-
licenses:
|
45
|
+
licenses:
|
36
46
|
- ISC
|
37
47
|
post_install_message:
|
38
48
|
rdoc_options: []
|
39
|
-
|
49
|
+
|
50
|
+
require_paths:
|
40
51
|
- lib
|
41
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
53
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
47
|
-
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
hash: 3
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
version: "0"
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
62
|
none: false
|
49
|
-
requirements:
|
50
|
-
- -
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
hash: 3
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
version: "0"
|
53
70
|
requirements: []
|
71
|
+
|
54
72
|
rubyforge_project:
|
55
73
|
rubygems_version: 1.8.6
|
56
74
|
signing_key:
|
57
75
|
specification_version: 3
|
58
76
|
summary: Logging class
|
59
77
|
test_files: []
|
78
|
+
|