rails-client-logger 1.0.3 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf6ff6cde7fee4cd6174a386f495adb48bfff5f3
4
- data.tar.gz: ecc87f453cf7a77588b27c592ae8751a91ec6d9c
3
+ metadata.gz: ec17c51fc62e6296c349ed741b377376eda5f3ed
4
+ data.tar.gz: e7a55613aec1b7ced63c720a581d19537e947063
5
5
  SHA512:
6
- metadata.gz: f4284ab942f01b6fa0b9dd494a7e2013e44e3d0f757ed45ce6b8d09b3371908570ec6e2372400a0963e12afb30d91c06bc053918480a750df113ee75adc6258f
7
- data.tar.gz: 770b5c7a13c2245cfe663313eb388f11478f5d96bc1b2a640625432c1bea982448cf2d2f76a37c405b186438dfbda1c6b089d52e19b01161e8a6567fd8536531
6
+ metadata.gz: 20c584e85e52d9eeb873ec66c6e438f03aad8f6c1d34fc218050b17cfbe3e8e295c47f15b027c40756ba4ff9084fa4f0cfe0cd1c2b13427d932b697875d8400a
7
+ data.tar.gz: 4c4e6ac8b761b21b1f5274e965570aa0324909168d742cad22d673b109498453dc49542ec6180ad02cc7507c9386bd1ff7faffddb7b87a90c0498663348a9283
data/README.md CHANGED
@@ -4,7 +4,10 @@ Rails engine to log from Client side (Browser) javascript to server log file. To
4
4
 
5
5
  There are 5 levels of logging: debug, info, warn, error and fatal.
6
6
 
7
- Supports Rails 4 (permitted parameters) as well as a CoffeeScript implementation of the client-side code.
7
+ If [exception_notification](https://github.com/smartinez87/exception_notification) is found, sends
8
+ notifications for `error` and `fatal` levels.
9
+
10
+ Supports Rails 4 (permitted parameters).
8
11
 
9
12
  For Rails 3.x use gem version `0.0.2`.
10
13
 
@@ -2,7 +2,11 @@ module RailsClientLogger
2
2
  class RailsClientLoggersController < ApplicationController
3
3
  def log
4
4
  if %w(debug info warn error fatal).include?(params[:level].to_s)
5
- Rails.logger.send(params[:level].to_s.to_sym, params[:message])
5
+ level = params[:level].to_s.to_sym
6
+ Rails.logger.send(level, params[:message])
7
+ if defined? ExceptionNotifier
8
+ ExceptionNotifier.notify_exception(Exception.new(params[:message]), env: request.env) if level == :fatal or level == :error
9
+ end
6
10
  head :ok
7
11
  else
8
12
  head :bad_request
@@ -1,3 +1,3 @@
1
1
  module RailsClientLogger
2
- VERSION = "1.0.3"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-client-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Girish Sonawane