diff --git a/pytools/__init__.py b/pytools/__init__.py index 796b3a23..b9d4f27f 100644 --- a/pytools/__init__.py +++ b/pytools/__init__.py @@ -2872,10 +2872,15 @@ def __init__(self, self.long_threshold_seconds = long_threshold_seconds def __call__(self, wrapped: Callable[P, R]) -> Callable[P, R]: + if self.description: + description = f"{wrapped.__qualname__} ({self.description})" + else: + description = wrapped.__qualname__ + def wrapper(*args: P.args, **kwargs: P.kwargs) -> R: with ProcessLogger( self.logger, - self.description or wrapped.__name__, + description, long_threshold_seconds=self.long_threshold_seconds): return wrapped(*args, **kwargs)