rails-logstasher 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjMyYmI1OWQ4YzgzMTYzMTlmMjRmZmIxYjZkNDAxN2Q0YTIwOTc0NA==
4
+ MDEwOGRmOThmNTdlZWNjNDI1ZWQ2MjkxMzE2ODY2YjMyY2ZkZDg4Nw==
5
5
  data.tar.gz: !binary |-
6
- MDUyMTI1YmQ1Y2QzNTNhNzMxYjAxYjkwMTczMGNhZmZiNzA2MTEzYQ==
6
+ OThjYmExMGU4MTdmYTYzN2RlYjg5ZmUzMjJiMDE1NjZiYmYxY2MyYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDlkODNkOWNiMDFjYjg3NDRiY2JjMGY3Nzk4YTlkNjUxZmMwOTYyOGE5YmQ1
10
- OTcwMDBiYmZiNDQ0N2E0ZmE1NTE5OGRlYThmY2YzZjExYzY3YWFlODVmZWY5
11
- YzhhMGM2NDRmNGJlZmVmMDNmYmRlZGNhODJlNWY0NTA3OTZlZTQ=
9
+ YmRhYWQ3ZDU2NDVkMWY5NzQ4MmRkYzc0MGY1Y2Y0ZWUzMmNlZmQ3NmQ2NTRk
10
+ YjkyNGNlODJhNmE0OWFiZTNkZTdkNmZiMWRmNGE4OWI1NWU1NGIxMjAxZDJk
11
+ YmMzZWRhMTYzZmE2MmQwNDEyZmE2NmVlNjE2NGNjYWIwMjZmY2Q=
12
12
  data.tar.gz: !binary |-
13
- ZTUwMjBkMzcxYzY0MzJhY2ZkYWEzYjRhNmM2MmE2OGQwMjZlNTg4OWZlZWI5
14
- YzViNzZjMTg2NjA5YTQ0NzcwOThjZWQ5OWNlYjYyNWE4MzFlYjA1MzYxZjIw
15
- NmNkYmYzY2I3NjgxZjY4NDlhZjdiMzNlN2ZhZWU4MGY2ODY3ODE=
13
+ NjJiNWYxYTdkMDU1N2U1YTFiMzJjZDFmNjM4MDI4MDg1ZGJlN2E2ZmQ3NzI3
14
+ ZDhhZTJkNDIzODI3MGUwMzZiMzBkYjkzZThkMDY0MmYwMDBlZjk3ZmIwOTQ2
15
+ MmNhMDM4YTc0Yzg0YjRkNzk3ODlkN2Y4NjA3NzUwMzM0ZDc2YjY=
data/README.md CHANGED
@@ -1,10 +1,5 @@
1
1
  # RailsLogstasher
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/capriza/rails-logstasher.png)](http://travis-ci.org/capriza/rails-logstasher)
4
- [![Coverage Status](https://coveralls.io/repos/capriza/rails-logstasher/badge.png?branch=master)](https://coveralls.io/r/capriza/rails-logstasher)
5
- [![Code Climate](https://codeclimate.com/github/capriza/rails-logstasher.png)](https://codeclimate.com/github/capriza/rails-logstasher)
6
- [![Dependency Status](https://gemnasium.com/capriza/rails-logstasher.png)](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
- You will need to edit the path to point to your application's log file. Because RailsLogstasher creates json
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
- RailsLogstasher currently creates nested JSON. Kibana has pretty good (With a few small UI problems) support
105
- for nested JSON but logstash web does not.
106
-
107
- ## Developers
108
-
109
- Thoughts, suggestions, opinions and contributions are welcome.
96
+ ```
97
+ module MyApp
98
+ class Application < Rails::Application
110
99
 
111
- When contributing please make sure to run your tests with warnings enabled and make sure that
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
- RUBYOPT=-w rake
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
@@ -1,3 +1,3 @@
1
1
  module RailsLogstasher
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-01-19 00:00:00.000000000 Z
11
+ date: 2014-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails