mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
update wakatime package
This commit is contained in:
parent
ff8fe836ec
commit
7860db12ae
@ -62,8 +62,16 @@ class JsonFormatter(logging.Formatter):
|
|||||||
return exec_info[2].format_exc()
|
return exec_info[2].format_exc()
|
||||||
|
|
||||||
|
|
||||||
|
def set_log_level(logger, args):
|
||||||
|
level = logging.WARN
|
||||||
|
if args.verbose:
|
||||||
|
level = logging.DEBUG
|
||||||
|
logger.setLevel(level)
|
||||||
|
|
||||||
|
|
||||||
def setup_logging(args, version):
|
def setup_logging(args, version):
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
set_log_level(logger, args)
|
||||||
if len(logger.handlers) > 0:
|
if len(logger.handlers) > 0:
|
||||||
return logger
|
return logger
|
||||||
logfile = args.logfile
|
logfile = args.logfile
|
||||||
@ -81,8 +89,4 @@ def setup_logging(args, version):
|
|||||||
)
|
)
|
||||||
handler.setFormatter(formatter)
|
handler.setFormatter(formatter)
|
||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
level = logging.WARN
|
|
||||||
if args.verbose:
|
|
||||||
level = logging.DEBUG
|
|
||||||
logger.setLevel(level)
|
|
||||||
return logger
|
return logger
|
||||||
|
Loading…
Reference in New Issue
Block a user