Sha256: 510b74b2efe6702d053bb44842c869cab10ae1e7d70324ca245b41fcb0b89390
Contents?: true
Size: 684 Bytes
Versions: 13
Compression:
Stored size: 684 Bytes
Contents
require 'logger' module SurveyGizmo class Logger < ::Logger def format_message(severity, timestamp, progname, message) if (api_token = SurveyGizmo.configuration.api_token) message.gsub!( /#{Regexp.quote(api_token)}|#{Regexp.quote(CGI.escape(api_token))}/, '<SG_API_KEY>' ) end if (api_token_secret = SurveyGizmo.configuration.api_token_secret) message.gsub!( /#{Regexp.quote(api_token_secret)}|#{Regexp.quote(CGI.escape(api_token_secret))}/, '<SG_API_SECRET>' ) end "[#{timestamp.strftime('%Y-%m-%d %H:%M:%S')} #{severity} (#{Process.pid})] #{message}\n" end end end
Version data entries
13 entries across 13 versions & 1 rubygems