batlog 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/app/models/log/db_log.rb +7 -1
- data/lib/batlog.rb +1 -1
- data/lib/log/controller_support.rb +1 -1
- data/lib/log/engine.rb +0 -1
- data/lib/log/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/app/models/log/db_log.rb
CHANGED
@@ -3,7 +3,13 @@ module Log
|
|
3
3
|
self.table_name = :logs
|
4
4
|
attr_accessible :severity, :message, :context
|
5
5
|
|
6
|
-
|
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
|
data/lib/batlog.rb
CHANGED
@@ -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
|
data/lib/log/engine.rb
CHANGED
data/lib/log/version.rb
CHANGED
metadata
CHANGED