diff --git a/Changelog.md b/Changelog.md
index <HASH>..<HASH> 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -1,4 +1,7 @@
-## master
+## 0.5.2
+- Fix bug with query logging
+
+## 0.5.1
 - Fix whitespace around operators
 - Add `Relation#from` method to redefine series
 - Handle nil values for tags in #where clause
diff --git a/lib/influxer/rails/client.rb b/lib/influxer/rails/client.rb
index <HASH>..<HASH> 100644
--- a/lib/influxer/rails/client.rb
+++ b/lib/influxer/rails/client.rb
@@ -3,7 +3,7 @@ module Influxer
   # - Add cache support for queries
   class Client
     def query(sql, options = {})
-      log(sql) do
+      log_sql(sql) do
         if !options.fetch(:cache, true) || Influxer.config.cache == false
           super(sql, options)
         else
@@ -12,7 +12,7 @@ module Influxer
       end
     end
 
-    def log(sql)
+    def log_sql(sql)
       return yield unless logger.debug?
 
       start_ts = Time.now
diff --git a/lib/influxer/version.rb b/lib/influxer/version.rb
index <HASH>..<HASH> 100644
--- a/lib/influxer/version.rb
+++ b/lib/influxer/version.rb
@@ -1,3 +1,3 @@
 module Influxer # :nodoc:
-  VERSION = "0.5.1".freeze
+  VERSION = "0.5.2".freeze
 end
Fix query logging (use separate log function); use Rails.logger as InfluxDB logger