Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.util.custom_logging

import logging
from typing import (
    Any,
    cast,
    Optional,
)


[docs] class GalaxyLogger(logging.Logger):
[docs] def trace(self, message: object, *args: Any, **kwargs: Any) -> None: if self.isEnabledFor(LOGLV_TRACE): self._log(LOGLV_TRACE, message, args, **kwargs)
# Add custom "TRACE" log level for ludicrous verbosity. LOGLV_TRACE = 5 logging.addLevelName(LOGLV_TRACE, "TRACE") logging.setLoggerClass(GalaxyLogger)
[docs] def get_logger(name: Optional[str] = None) -> GalaxyLogger: logger = logging.getLogger(name) return cast(GalaxyLogger, logger)