I run this earlier in the code
watch("httpstream")
Subsequently, any py2neo
commands that triggers HTTP traffic will result in verbose logging. How can I stop the effect of watch()
logging without creating a new Graph
instance?
You can set the logging level to a higher value, for example
import logging
logging.getLogger("httpstream").setLevel(Logging.WARNING)
You can enumerate a list of all available loggers
print logging.Logger.manager.loggerDict.keys()
Then, you can use either
logging.getLogger("httpstream").getEffectiveLevel()
or
logging.getLogger("httpstream").isEnabledFor(logging.DEBUG)
to get the logging level.