Mercurial > code > home > repos > homeauto
diff service/reasoning/reasoning.py @ 600:a34dee00a989
comments and logging
Ignore-this: 75df9bd5008caef0fd53eaa811f1500a
author | drewp@bigasterisk.com |
---|---|
date | Tue, 23 Jul 2019 10:16:59 -0700 |
parents | 53a2664f450a |
children | 62171aa2bc4e |
line wrap: on
line diff
--- a/service/reasoning/reasoning.py Tue Jul 23 10:16:14 2019 -0700 +++ b/service/reasoning/reasoning.py Tue Jul 23 10:16:59 2019 -0700 @@ -19,7 +19,6 @@ import json, time, traceback, sys from logging import getLogger, DEBUG, WARN -sys.path.append('/opt') # docker is putting lib/ here from colorlog import ColoredFormatter from docopt import docopt @@ -35,8 +34,8 @@ from actions import Actions from inputgraph import InputGraph from escapeoutputstatements import unquoteOutputStatements - -from standardservice.logsetup import log + +from standardservice.logsetup import log, verboseLogging ROOM = Namespace("http://projects.bigasterisk.com/room/") @@ -271,7 +270,7 @@ def configLogging(arg): log.setLevel(WARN) - if arg['-i'] or arg['-r'] or arg['-o']: + if arg['-i'] or arg['-r'] or arg['-o'] or arg['-v']: log.handlers[0].setFormatter(ColoredFormatter("%(log_color)s%(levelname)-8s %(name)-6s %(filename)-12s:%(lineno)-3s %(funcName)-20s%(reset)s %(white)s%(message)s", datefmt=None, reset=True, @@ -304,6 +303,7 @@ -i Verbose log on the input phase -r Verbose log on the reasoning phase and web stuff -o Verbose log on the actions/output phase + -v Everywhere verbose """) r = Reasoning()