medusa.log
#
A module with logging functionality.
Module Contents#
- medusa.log.get_logger(level='INFO')[source]#
Creates a Python logger with a nice format.
- Parameters:
level (str) – Logging level (“INFO”, “DEBUG”, “WARNING”)
- Returns:
logger – A Python logger
- Return type:
logging.Logger
Examples
>>> logger = get_logger() >>> logger.info("Hello!")
- medusa.log.tqdm_log(iter_, logger, desc='Render shape')[source]#
Creates an iterator with optional tqdm progressbar that plays nicely with an existing Medusa logger.
- Parameters:
iter (iterable) – Initial iterable
logger (logging.Logger) – Existing Medusa logger
desc (str) – Text to display before progress bar
- Returns:
iter_ – Iterable to be iterated over
- Return type:
iterable