sessionm-cassandra_object 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,30 +1,35 @@
|
|
1
1
|
module CassandraObject
|
2
2
|
class LogSubscriber < ActiveSupport::LogSubscriber
|
3
3
|
def add(event)
|
4
|
+
return unless logger && logger.debug?
|
4
5
|
name = '%s add (%.1fms)' % [event.payload[:column_family], event.duration]
|
5
6
|
|
6
7
|
debug " #{name} #{event.payload[:key]}[#{event.payload[:column]}]#{event.payload[:sub_column] ? '[' + event.payload[:sub_column] + ']' : ''} by #{event.payload[:value]}"
|
7
8
|
end
|
8
9
|
|
9
10
|
def get(event)
|
11
|
+
return unless logger && logger.debug?
|
10
12
|
name = '%s get (%.1fms)' % [event.payload[:column_family], event.duration]
|
11
13
|
|
12
14
|
debug " #{name} #{event.payload[:key]}"
|
13
15
|
end
|
14
16
|
|
15
17
|
def get_counter(event)
|
18
|
+
return unless logger && logger.debug?
|
16
19
|
name = '%s get_counter (%.1fms)' % [event.payload[:column_family], event.duration]
|
17
20
|
|
18
21
|
debug " #{name} #{event.payload[:key]}[#{event.payload[:column]}]"
|
19
22
|
end
|
20
23
|
|
21
24
|
def multi_get(event)
|
25
|
+
return unless logger && logger.debug?
|
22
26
|
name = '%s multi_get (%.1fms)' % [event.payload[:column_family], event.duration]
|
23
27
|
|
24
28
|
debug " #{name} (#{event.payload[:keys].size}) #{event.payload[:keys].join(" ")}"
|
25
29
|
end
|
26
30
|
|
27
31
|
def remove(event)
|
32
|
+
return unless logger && logger.debug?
|
28
33
|
name = '%s remove (%.1fms)' % [event.payload[:column_family], event.duration]
|
29
34
|
|
30
35
|
message = " #{name} #{event.payload[:key]}"
|
@@ -34,24 +39,28 @@ module CassandraObject
|
|
34
39
|
end
|
35
40
|
|
36
41
|
def truncate(event)
|
42
|
+
return unless logger && logger.debug?
|
37
43
|
name = '%s truncate (%.1fms)' % [event.payload[:column_family], event.duration]
|
38
44
|
|
39
45
|
debug " #{name} #{event.payload[:column_family]}"
|
40
46
|
end
|
41
47
|
|
42
48
|
def insert(event)
|
49
|
+
return unless logger && logger.debug?
|
43
50
|
name = '%s insert (%.1fms)' % [event.payload[:column_family], event.duration]
|
44
51
|
|
45
52
|
debug " #{name} #{event.payload[:key]} #{event.payload[:attributes].inspect}"
|
46
53
|
end
|
47
54
|
|
48
55
|
def get_range(event)
|
56
|
+
return unless logger && logger.debug?
|
49
57
|
name = '%s get_range (%.1fms)' % [event.payload[:column_family], event.duration]
|
50
58
|
|
51
59
|
debug " #{name} (#{event.payload[:count]}) '#{event.payload[:start]}' => '#{event.payload[:finish]}'"
|
52
60
|
end
|
53
61
|
|
54
62
|
def get_slice(event)
|
63
|
+
return unless logger && logger.debug?
|
55
64
|
name = '%s get_slice (%.1fms)' % [event.payload[:column_family], event.duration]
|
56
65
|
|
57
66
|
debug " #{name} #{event.payload[:key]} '#{event.payload[:start]}' => '#{event.payload[:finish]}'"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sessionm-cassandra_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-
|
14
|
+
date: 2013-05-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: 1.3.5
|
181
181
|
requirements: []
|
182
182
|
rubyforge_project:
|
183
|
-
rubygems_version: 1.8.
|
183
|
+
rubygems_version: 1.8.23
|
184
184
|
signing_key:
|
185
185
|
specification_version: 3
|
186
186
|
summary: Cassandra ActiveModel
|