biola_logs 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -6
- data/lib/biola_logs.rb +1 -0
- data/lib/biola_logs/controller_extensions.rb +21 -0
- data/lib/biola_logs/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dea0d10b035a6f6cc7850816bf9639a27267012f
|
4
|
+
data.tar.gz: 23dfe99e7a0e38857bf6bbf72fa0587535936fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b3f8b70a03e4e4800a2beae8b8fe31c93b46098c8a1b8f2ccbfa12cd33abc12beb51a41fb31f4d31c1c16bcd0f18d6f63fb71cd4077f28cac628b3df1166ebc
|
7
|
+
data.tar.gz: 7b909e078e0a7d092fb51b98a396184bf9c646fe59f48011a0a83341efd4736ddd598eb2c6a3b4d35d08a999b199b9e3b85ff64ba8b035dd7a386df8083d7210
|
data/README.md
CHANGED
@@ -24,12 +24,7 @@ To log `session_id`, `request_id` (or uuid), and `host_name` you need to add the
|
|
24
24
|
```ruby
|
25
25
|
# app/controllers/application_controller.rb
|
26
26
|
class ApplicationController < ActionController::Base
|
27
|
-
|
28
|
-
super
|
29
|
-
payload[:session_id] = request.session_options[:id]
|
30
|
-
payload[:uuid] = request.uuid
|
31
|
-
payload[:host] = request.host
|
32
|
-
end
|
27
|
+
include BiolaLogs::ControllerExtensions if defined?(BiolaLogs::ControllerExtensions)
|
33
28
|
end
|
34
29
|
```
|
35
30
|
|
data/lib/biola_logs.rb
CHANGED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Include this module in your application controller to get the additional
|
2
|
+
# data into the log
|
3
|
+
#
|
4
|
+
# class ApplicationController < ActionController::Base
|
5
|
+
# include BiolaLogs::ControllerExtensions if defined?(BiolaLogs::ControllerExtensions)
|
6
|
+
# end
|
7
|
+
#
|
8
|
+
module BiolaLogs
|
9
|
+
module ControllerExtensions
|
10
|
+
|
11
|
+
protected
|
12
|
+
|
13
|
+
# Custom attributes for lograge logging
|
14
|
+
def append_info_to_payload(payload)
|
15
|
+
super
|
16
|
+
payload[:session_id] = request.session_options[:id]
|
17
|
+
payload[:uuid] = request.uuid
|
18
|
+
payload[:host] = request.host
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/biola_logs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biola_logs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lograge
|
@@ -33,6 +33,7 @@ files:
|
|
33
33
|
- MIT-LICENSE
|
34
34
|
- README.md
|
35
35
|
- lib/biola_logs.rb
|
36
|
+
- lib/biola_logs/controller_extensions.rb
|
36
37
|
- lib/biola_logs/generators.rb
|
37
38
|
- lib/biola_logs/generators/base.rb
|
38
39
|
- lib/biola_logs/generators/headers.rb
|
@@ -59,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
60
|
version: '0'
|
60
61
|
requirements: []
|
61
62
|
rubyforge_project:
|
62
|
-
rubygems_version: 2.
|
63
|
+
rubygems_version: 2.6.1
|
63
64
|
signing_key:
|
64
65
|
specification_version: 4
|
65
66
|
summary: Standardized log formatter
|