Commit 3bb4611d authored by Matias Guijarro's avatar Matias Guijarro

logtools refactoring

* use BlissLogger class instead of improve_logger
* Disable bad loggers from Jedi
* fixed map_update_loggers
    - It is not enough to update the name, it needs a fixup for parents and to be removed from loggers dict
* use of specific debug log handler
* simplified lslog
* tests: added logging module clearing at fixture cleanup
parent 2cb8cb67
This diff is collapsed.
......@@ -174,6 +174,9 @@ def main():
arguments = docopt(__doc__)
# disable those ugly loggers from jedi
logging.getLogger("parso.python.diff").disabled = True
logging.getLogger("parso.cache").disabled = True
# initialize logging
log_level = getattr(logging, arguments["--log-level"][0].upper())
......@@ -9,7 +9,7 @@ import pytest
import logging
import re
from bliss.common.logtools import map_update_loggers, Log, LogMixin
from bliss.common.logtools import map_update_loggers, Log, LogMixin, logging_startup
from bliss.common.standard import debugon, debugoff
from bliss.common.mapping import Map
from bliss.common import session
......@@ -31,11 +31,14 @@ def params(beacon, map):
Creates a new beacon and log instance
log = Log(map=map)
return beacon, log
yield beacon, log
class NotMappedController(LogMixin):
......@@ -197,8 +200,10 @@ def test_LogMixin(params, caplog):
assert hasattr(mc._logger, "debug_data")
def test_standard_debugon_debugoff(session):
roby = session.config.get("roby")
def test_standard_debugon_debugoff(params):
beacon, log = params
roby = beacon.get("roby")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment