batlog 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,9 @@
1
+ ### 0.9.2 - bug fixes
2
+ * converted DB context to be saved as JSON, ActiveRecord::Store is problematic
1
3
 
2
4
  ### 0.9.1 - bug fixes
3
5
  * BUGFIX - post a message without context
6
+
4
7
  ### 0.9 - Initial Release
5
8
  * Basic Functionality
6
9
  * Log.info,warn,debug,error,fatal
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- batlog (0.9.01)
4
+ batlog (0.9.1)
5
5
  rails
6
6
 
7
7
  GEM
@@ -3,7 +3,13 @@ module Log
3
3
  self.table_name = :logs
4
4
  attr_accessible :severity, :message, :context
5
5
 
6
- store :context, :accessors => [:environment]
6
+ def context=(hash = {})
7
+ self[:context] = hash.to_json
8
+ end
9
+
10
+ def context
11
+ ActiveSupport::JSON.decode(self[:context] || "{}").with_indifferent_access
12
+ end
7
13
 
8
14
  end
9
15
  end
@@ -1,5 +1,5 @@
1
- require 'log/log'
2
1
  require "log/engine"
2
+ require 'log/log'
3
3
 
4
4
  module Log
5
5
  end
@@ -21,7 +21,7 @@ module Log
21
21
  :referer => request.referer,
22
22
  :environment => Rails.env.to_s,
23
23
  :session_id => request.session_options[:id],
24
- :session => session,
24
+ :session => request.session,
25
25
  :params => params
26
26
  )
27
27
  context.merge!(:current_user => current_user.try(:id)) if respond_to? :current_user
@@ -1,4 +1,3 @@
1
- require "batlog"
2
1
  require 'rails'
3
2
 
4
3
  module Log
@@ -1,3 +1,3 @@
1
1
  module Log
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: batlog
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 1
10
- version: 0.9.1
9
+ - 2
10
+ version: 0.9.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Asaf Gartner