logg 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +5 -0
- data/README.md +5 -3
- data/lib/logg/version.rb +1 -1
- metadata +7 -6
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -66,6 +66,7 @@ class Foo
|
|
66
66
|
log.as(:foo) do
|
67
67
|
puts "something really important happened"
|
68
68
|
end
|
69
|
+
log.foo # => "something really important happened" on $stdout
|
69
70
|
|
70
71
|
# you may also define a template within the block, render it and
|
71
72
|
# use the result.
|
@@ -78,10 +79,11 @@ class Foo
|
|
78
79
|
|
79
80
|
# now we want to render an external HAML template, providing its path with
|
80
81
|
# or withouth the .haml extension (if not provided, the :as option is mandatory)
|
81
|
-
log.as(:http_response) do |
|
82
|
-
output = render('tpl/foo', :
|
83
|
-
# do something with output
|
82
|
+
log.as(:http_response) do |response|
|
83
|
+
output = render('tpl/foo.haml', :data => response)
|
84
|
+
# do something with output, for instance, send a mail notification when not a 200
|
84
85
|
end
|
86
|
+
log.http_response(resp) # performs the block, really
|
85
87
|
end
|
86
88
|
```
|
87
89
|
|
data/lib/logg/version.rb
CHANGED
metadata
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
name: logg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
|
-
- Jean-Denis Vauguet <
|
8
|
+
- Jean-Denis Vauguet <jd@vauguet.fr>
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
@@ -14,8 +14,8 @@ date: 2011-07-02 00:00:00 +02:00
|
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
17
|
-
description: A simple logger for your ruby applications.
|
18
|
-
email:
|
17
|
+
description: A simple message dispatcher (aka. logger) for your ruby applications.
|
18
|
+
email: jd@vauguet.fr
|
19
19
|
executables: []
|
20
20
|
|
21
21
|
extensions: []
|
@@ -31,8 +31,9 @@ files:
|
|
31
31
|
- Rakefile
|
32
32
|
- Guardfile
|
33
33
|
- README.md
|
34
|
+
- CHANGELOG.md
|
34
35
|
has_rdoc: true
|
35
|
-
homepage: http://www.github.com/
|
36
|
+
homepage: http://www.github.com/chikamichi/logg
|
36
37
|
licenses: []
|
37
38
|
|
38
39
|
post_install_message:
|
@@ -58,6 +59,6 @@ rubyforge_project:
|
|
58
59
|
rubygems_version: 1.6.1
|
59
60
|
signing_key:
|
60
61
|
specification_version: 3
|
61
|
-
summary: A simple logger.
|
62
|
+
summary: A simple ruby logger.
|
62
63
|
test_files: []
|
63
64
|
|