Mercurial > touhou
diff pytouhou/utils/helpers.py @ 566:04ae31809dc7
Move all logging logic to the root logger, we don’t need specific handlers anymore.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Mon, 30 Jun 2014 20:37:52 +0200 |
parents | 3da4de9decd0 |
children |
line wrap: on
line diff
--- a/pytouhou/utils/helpers.py +++ b/pytouhou/utils/helpers.py @@ -12,18 +12,8 @@ ## GNU General Public License for more details. ## - -from logging import StreamHandler, Formatter, getLogger - - -def get_logger(name): - handler = StreamHandler() - formatter = Formatter(fmt='[%(name)s] [%(levelname)s]: %(message)s') - handler.setFormatter(formatter) - logger = getLogger(name) - logger.addHandler(handler) - logger.propagate = False - return logger +#TODO: remove that someday. +from logging import getLogger as get_logger def read_string(file, size, encoding=None):