Merge pull request #205 from mengzhuo/master

add python Logger snippet
This commit is contained in:
Honza Pokorny 2013-05-17 02:04:52 -07:00
commit a26b3f9c0f

View File

@ -162,3 +162,18 @@ snippet getopt
${4}
elif option in ("-v", "--verbose"):
verbose = argument
# logging
# glog = get log
snippet glog
import logging
logger = logging.getLogger(${1:__name__})
snippet le
logger.error(${1:msg})
snippet ld
logger.debug(${1:msg})
snippet lw
logger.warning(${1:msg})
snippet lc
logger.critical(${1:msg})
snippet li
logger.info(${1:msg})