From f5743a320c738e0af0ac577c221b35233244c7d6 Mon Sep 17 00:00:00 2001 From: Chris Allan Date: Wed, 19 Jun 2024 10:16:13 +0000 Subject: [PATCH 1/2] Switch result logging to DEBUG level --- src/omero/util/decorators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/omero/util/decorators.py b/src/omero/util/decorators.py index fbc0807c2..93194ade2 100644 --- a/src/omero/util/decorators.py +++ b/src/omero/util/decorators.py @@ -69,7 +69,8 @@ def exc_handler(*args, **kwargs): self = args[0] log.info(" Meth: %s.%s", self.__class__.__name__, func.__name__) rv = func(*args, **kwargs) - log.info(__RESULT, rv) + if log.isEnabledFor(logging.DEBUG): + log.debug(__RESULT, rv) return rv except Exception as e: log.info(__EXCEPT, e) From 78935e06b5466c326a526f704ad68bad8fcfdc3a Mon Sep 17 00:00:00 2001 From: Chris Allan Date: Fri, 21 Jun 2024 08:41:12 +0000 Subject: [PATCH 2/2] Log the type at INFO if DEBUG is not enabled --- src/omero/util/decorators.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/omero/util/decorators.py b/src/omero/util/decorators.py index 93194ade2..7a321b0c6 100644 --- a/src/omero/util/decorators.py +++ b/src/omero/util/decorators.py @@ -71,6 +71,8 @@ def exc_handler(*args, **kwargs): rv = func(*args, **kwargs) if log.isEnabledFor(logging.DEBUG): log.debug(__RESULT, rv) + else: + log.info(__RESULT, type(rv)) return rv except Exception as e: log.info(__EXCEPT, e)