rails-logstasher 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +9 -20
- data/lib/rails-logstasher/event.rb +1 -1
- data/lib/rails-logstasher/tagged_logging.rb +1 -1
- data/lib/rails-logstasher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDEwOGRmOThmNTdlZWNjNDI1ZWQ2MjkxMzE2ODY2YjMyY2ZkZDg4Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OThjYmExMGU4MTdmYTYzN2RlYjg5ZmUzMjJiMDE1NjZiYmYxY2MyYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmRhYWQ3ZDU2NDVkMWY5NzQ4MmRkYzc0MGY1Y2Y0ZWUzMmNlZmQ3NmQ2NTRk
|
10
|
+
YjkyNGNlODJhNmE0OWFiZTNkZTdkNmZiMWRmNGE4OWI1NWU1NGIxMjAxZDJk
|
11
|
+
YmMzZWRhMTYzZmE2MmQwNDEyZmE2NmVlNjE2NGNjYWIwMjZmY2Q=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjJiNWYxYTdkMDU1N2U1YTFiMzJjZDFmNjM4MDI4MDg1ZGJlN2E2ZmQ3NzI3
|
14
|
+
ZDhhZTJkNDIzODI3MGUwMzZiMzBkYjkzZThkMDY0MmYwMDBlZjk3ZmIwOTQ2
|
15
|
+
MmNhMDM4YTc0Yzg0YjRkNzk3ODlkN2Y4NjA3NzUwMzM0ZDc2YjY=
|
data/README.md
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
# RailsLogstasher
|
2
2
|
|
3
|
-
[](http://travis-ci.org/capriza/rails-logstasher)
|
4
|
-
[](https://coveralls.io/r/capriza/rails-logstasher)
|
5
|
-
[](https://codeclimate.com/github/capriza/rails-logstasher)
|
6
|
-
[](https://gemnasium.com/capriza/rails-logstasher)
|
7
|
-
|
8
3
|
Logstash logging system for Ruby on Rails.
|
9
4
|
This is a fork from https://github.com/rurounijones/yarder.
|
10
5
|
|
@@ -96,23 +91,17 @@ module MyApp
|
|
96
91
|
end
|
97
92
|
```
|
98
93
|
|
99
|
-
|
100
|
-
serialized Logstash::Event entries there is no need to setup any filters
|
101
|
-
|
102
|
-
### Known issues
|
94
|
+
It is also possible to cancel a log event entirely, like so:
|
103
95
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
## Developers
|
108
|
-
|
109
|
-
Thoughts, suggestions, opinions and contributions are welcome.
|
96
|
+
```
|
97
|
+
module MyApp
|
98
|
+
class Application < Rails::Application
|
110
99
|
|
111
|
-
|
112
|
-
rails-logstasher creates no warnings. (Warnings from other libraries like capybara etc. are ok)
|
100
|
+
config.log_entry_processor = Proc.new {|entry| entry.cancel }
|
113
101
|
|
102
|
+
end
|
103
|
+
end
|
114
104
|
```
|
115
|
-
|
116
|
-
|
117
|
-
|
105
|
+
You will need to edit the path to point to your application's log file. Because RailsLogstasher creates json
|
106
|
+
serialized Logstash::Event entries there is no need to setup any filters
|
118
107
|
|
@@ -5,7 +5,7 @@ module RailsLogstasher
|
|
5
5
|
class Event
|
6
6
|
|
7
7
|
extend Forwardable
|
8
|
-
def_delegators :@logstash_event, :fields, :message=, :source=, :type=, :tags, :to_json
|
8
|
+
def_delegators :@logstash_event, :fields, :message=, :source=, :type=, :tags, :to_json, :cancel, :uncancel, :cancelled?
|
9
9
|
|
10
10
|
def initialize(logger, rack = false)
|
11
11
|
@logger = logger
|
@@ -34,7 +34,7 @@ module RailsLogstasher
|
|
34
34
|
process_entry
|
35
35
|
|
36
36
|
#TODO Should we do anything with progname? What about source?
|
37
|
-
super(severity, timestamp, progname, @entry.to_json)
|
37
|
+
super(severity, timestamp, progname, @entry.to_json) unless @entry.cancelled?
|
38
38
|
end
|
39
39
|
|
40
40
|
def process_entry
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-logstasher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nadav Fischer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|