Remove api key from logging

This commit is contained in:
Ruud
2012-01-14 15:25:49 +01:00
parent fcc008ceda
commit 9483e30bb9
+8
View File
@@ -37,4 +37,12 @@ class CPLog(object):
for replace in self.replace_private:
msg = re.sub('(%s=)[^\&]+' % replace, '%s=xxx' % replace, msg)
# Replace api key
try:
from couchpotato.environment import Env
api_key = Env.setting('api_key')
msg = msg.replace(api_key, 'API_KEY')
except:
pass
return msg