Remove .main from logging

This commit is contained in:
Ruud
2011-10-10 13:50:32 +02:00
parent 2eff364d7e
commit 08a456a6bf
+4 -5
View File
@@ -1,3 +1,4 @@
import color_logs
import logging
import re
@@ -7,14 +8,12 @@ class CPLog():
replace_private = ['api', 'apikey', 'api_key', 'password', 'username', 'h']
def __init__(self, context = ''):
if context.endswith('.main'):
context = context[:-5]
self.context = context
self.logger = logging.getLogger()
try:
import color_logs
except:
pass
def info(self, msg):
self.logger.info(self.addContext(msg))