diff --git a/pmb/helpers/logging.py b/pmb/helpers/logging.py index cf7608f8..c4c2a459 100644 --- a/pmb/helpers/logging.py +++ b/pmb/helpers/logging.py @@ -6,6 +6,7 @@ from pathlib import Path import sys from typing import TextIO import pmb.config +from pmb.meta import Cache logfd: TextIO @@ -177,6 +178,10 @@ def warning(msg: object, *args, **kwargs): logging.warning(msg, *args, **kwargs) +@Cache("msg") +def warn_once(msg: str): + logging.warning(msg) + def info(msg: object, *args, **kwargs): logging.info(msg, *args, **kwargs)