Print a debug message. Args: msg: The debug message. kwargs: Keyword arguments to pass to the print function.
(msg: str, **kwargs)
| 41 | |
| 42 | |
| 43 | def debug(msg: str, **kwargs): |
| 44 | """Print a debug message. |
| 45 | |
| 46 | Args: |
| 47 | msg: The debug message. |
| 48 | kwargs: Keyword arguments to pass to the print function. |
| 49 | """ |
| 50 | if _LOG_LEVEL <= LogLevel.DEBUG: |
| 51 | msg_ = f"[blue]Debug: {msg}[/blue]" |
| 52 | if progress := kwargs.pop("progress", None): |
| 53 | progress.console.print(msg_, **kwargs) |
| 54 | else: |
| 55 | print(msg_, **kwargs) |
| 56 | |
| 57 | |
| 58 | def info(msg: str, **kwargs): |