diff --git a/materialx/emoji.py b/materialx/emoji.py index b1620d9..9418856 100644 --- a/materialx/emoji.py +++ b/materialx/emoji.py @@ -15,6 +15,9 @@ import xml.etree.ElementTree as etree # noqa: N813 import warnings from functools import wraps +import logging + +log = logging.getLogger('mkdocs') DEPRECATED = """ Material emoji logic has been officially moved into mkdocs-material @@ -32,6 +35,13 @@ RES_PATH = os.path.join(RESOURCES, '.icons') +@functools.lru_cache(maxsize=None) +def log_msg(message): + """Log message.""" + + log.warn(message) + + def deprecated(message, stacklevel=2, name=None): # pragma: no cover """ Raise a `DeprecationWarning` when wrapped function/method is called. @@ -51,6 +61,8 @@ def _deprecated_func(*args, **kwargs): category=DeprecationWarning, stacklevel=stacklevel ) + + log_msg(message) return func(*args, **kwargs) return _deprecated_func return _wrapper