mysql2_query_filter-plugin-log 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mysql2_query_filter/plugin/log.rb +6 -2
- data/mysql2_query_filter-plugin-log.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb87d5e0b71b3658268912fe4d25d50656b6c2d4
|
|
4
|
+
data.tar.gz: 46e6d17620847e58c5b5a04d28570d6a9182aef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44f676547a10e86180876ad42d978d0336cf1ef1f67e6d053339e9bf0de69996332260b754ac265124b45adbd24d7ca27b7629c89b43811e0af245b74bec9332
|
|
7
|
+
data.tar.gz: 11408100d6f4a6dbf6c45a250aaf3e78836a6d33993068f94fe775e403efad1f824b70cf3054f2782425babc67b2c7801e013ef8a09d5a84764e055f2f6fa1b8
|
|
@@ -4,9 +4,13 @@ module Mysql2QueryFilter::Plugin
|
|
|
4
4
|
class Log < Filter
|
|
5
5
|
Mysql2QueryFilter.register(:log, self)
|
|
6
6
|
|
|
7
|
+
def initialize(options)
|
|
8
|
+
super
|
|
9
|
+
@out = @options[:out] || $stderr
|
|
10
|
+
end
|
|
11
|
+
|
|
7
12
|
def filter(sql)
|
|
8
|
-
|
|
9
|
-
out.puts(sql)
|
|
13
|
+
@out << "#{sql}\n"
|
|
10
14
|
end
|
|
11
15
|
end
|
|
12
16
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# coding: utf-8
|
|
2
2
|
Gem::Specification.new do |spec|
|
|
3
3
|
spec.name = 'mysql2_query_filter-plugin-log'
|
|
4
|
-
spec.version = '0.0.
|
|
4
|
+
spec.version = '0.0.3'
|
|
5
5
|
spec.authors = ['Genki Sugawara']
|
|
6
6
|
spec.email = ['sgwr_dts@yahoo.co.jp']
|
|
7
7
|
spec.summary = %q{Logging plug-in for Mysql2QueryFilter.}
|