1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

actually remove all logger() occurrences

This commit is contained in:
urlbot
2015-06-21 01:31:55 +02:00
parent 32e2d15581
commit 3f6c478586
3 changed files with 6 additions and 8 deletions

View File

@@ -2,13 +2,11 @@
import time, sys
def _logger(a, b):
sys.stderr.write('logger: %s::%s\n' %(a, b))
try:
logger
log
except NameError:
logger = _logger
import logging
log = logging.getLogger()
if '__main__' == __name__:
print('''this is a config file, which is not meant to be executed''')
@@ -58,7 +56,7 @@ config = {
def conf(val):
if val in list(config.keys()):
return config[val]
logger('warn', 'conf(): unknown key ' + str(val))
log.warn('conf(): unknown key ' + str(val))
return None
def set_conf(key, val):

View File

@@ -799,7 +799,7 @@ def data_parse_commands(msg_obj):
if debug_enabled():
def _send_reply(a, msg_obj):
logger('send_reply[%s]' % msg_obj, a)
log.info('send_reply[%s]' % msg_obj, a)
def _conf(ignored):
return 'bot'

View File

@@ -61,7 +61,7 @@ def extract_title(url):
if html_text:
charset = ''
if 'content-type' in headers:
logger('debug', 'content-type: ' + headers['content-type'])
log.debug('content-type: ' + headers['content-type'])
if 'text/' != headers['content-type'][:len('text/')]:
return (1, headers['content-type'])