Bases: fixtures.fixture.Fixture
Configure logging.
The behavior is managed through two environment variables. If
OS_DEBUG
is true then the logging level is set to debug. If
OS_LOG_CAPTURE
is true a FakeLogger is configured. Alternatively,
OS_DEBUG
can be set to an explicit log level, such as INFO
.
“True” values include True
, true
, 1
and yes
.
Valid log levels include DEBUG
, INFO
, WARNING
, ERROR
,
TRACE
and CRITICAL
(or any other valid integer logging level).
The logger fixture, if it is created.
logging.DEBUG
if debug logging is enabled, otherwise
the log level specified by OS_DEBUG
, otherwise None
.
format – The logging format string to use.
Default log format
Prepare the Fixture for use.
This should not be overridden. Concrete fixtures should implement _setUp. Overriding of setUp is still supported, just not recommended.
After setUp has completed, the fixture will have one or more attributes which can be used (these depend totally on the concrete subclass).
MultipleExceptions if _setUp fails. The last exception captured within the MultipleExceptions will be a SetupError exception.
None.
The recommendation to override setUp has been reversed - before 1.3, setUp() should be overridden, now it should not be.
BaseException is now caught, and only subclasses of Exception are wrapped in MultipleExceptions.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.