Skip to content

Commit

Permalink
fix the bug for filtering json message (#13)
Browse files Browse the repository at this point in the history
* fix the bug for filtering json message

* add the return content
  • Loading branch information
lian523 authored and j03w committed Aug 7, 2017
1 parent c429847 commit fd01ac7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/amaysim_logger/keyword_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def filter_hash(content, filtered_keywords)
def filter_json(content, filtered_keywords)
return content unless content.is_a?(String)
json = JSON.parse(content)
filter_hash(json, filtered_keywords).to_json
content.respond_to?(:keys) ? filter_hash(json, filtered_keywords).to_json : content
rescue
content
end
Expand Down
2 changes: 1 addition & 1 deletion lib/amaysim_logger/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class AmaysimLogger
VERSION = '1.1.0'.freeze
VERSION = '1.2.0'.freeze
end

0 comments on commit fd01ac7

Please sign in to comment.