Utilities¶
-
openstack.utils.
enable_logging
(debug=False, path=None, stream=None)¶ Enable logging to a file at path and/or a console stream.
This function is available for debugging purposes. If you wish to log this package’s message in your application, the standard library
logging
package will receive these messages in any handlers you create.Parameters: - debug (bool) – Set this to
True
to receive debug messages, which includes HTTP requests and responses, orFalse
for warning messages. - path (str) – If a path is specified, logging output will written to that file in addition to sys.stderr. The path is passed to logging.FileHandler, which will append messages the file (and create it if needed).
- stream – One of
None `` or ``sys.stdout
orsys.stderr
. If it isNone
, nothing is logged to a stream. If it isn’tNone
, console output is logged to this stream.
Return type: None
- debug (bool) – Set this to