gray_logger 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -19,6 +19,8 @@ GrayLogger is a small logging tool that allows you to simply log anything you wa
|
|
19
19
|
host: 127.0.0.1
|
20
20
|
port: 12201
|
21
21
|
facility: "myapp"
|
22
|
+
automatic_logging: true # flushes all collected fields to graylog after request
|
23
|
+
level: 1 # GELF::INFO
|
22
24
|
```
|
23
25
|
|
24
26
|
3. if you are using Rails 2.3 please add the following code to an initializer:
|
@@ -26,6 +28,7 @@ GrayLogger is a small logging tool that allows you to simply log anything you wa
|
|
26
28
|
require 'gray_logger'
|
27
29
|
begin
|
28
30
|
gray_logger_config = YAML.load(File.read(Rails.root.join("config/gray_logger.yml")))[Rails.env]
|
31
|
+
::GrayLogger.configure(gray_logger_config)
|
29
32
|
Rails.configuration.middleware.insert_after Rack::Lock, "Rack::GrayLogger::Middleware", :configuration => gray_logger_config
|
30
33
|
rescue => e
|
31
34
|
$stderr.puts("GrayLogger not configured. Please add config/gray_logger.yml")
|
@@ -36,8 +39,8 @@ GrayLogger is a small logging tool that allows you to simply log anything you wa
|
|
36
39
|
|
37
40
|
4. To install the gray_logger proxy:
|
38
41
|
````ruby
|
39
|
-
|
40
|
-
config.logger =
|
42
|
+
::GrayLogger.proxy.proxied_logger = Syslogger.new("path...")
|
43
|
+
config.logger = ::GrayLogger.proxy
|
41
44
|
````
|
42
45
|
|
43
46
|
## Usage
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gray_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 11
|
9
|
-
-
|
10
|
-
version: 0.11.
|
9
|
+
- 2
|
10
|
+
version: 0.11.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Benjamin Behr
|