returns a fixture to make logging raise formatting exceptions.
To use:
from oslo_log import fixture as log_fixture
self.useFixture(log_fixture.get_logging_handle_error_fixture())
Override the log level for the named loggers, restoring their previous value at the end of the test.
To use:
from oslo_log import fixture as log_fixture
self.useFixture(log_fixture.SetLogLevel(['myapp.foo'], logging.DEBUG))
logger_names (list(str)) – Sequence of logger names, as would be passed to getLogger().
level (int) – Logging level, usually one of logging.DEBUG, logging.INFO, etc.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.