> The administrator wants a central place to collate all operations in one place, for further performance analysis. The timing of all LDAP operations and all authorization requests should be logged on TRACE level with their duration. The request ID is part of all log lines, so the logged events can be related to the corresponding operation (e.g. UDM Creation of an object).
The Structured log wrapper now provides a context manager method "timing" which can be used to log the duration, e.g: >>> with log.timing('Message'): ... import time ... 2025-10-29T12:11:15.409133+00:00 TRACE [ -] Message | pid=1953488 logname=ADMIN func=<stdin>.<module>:1 duration=0.000010 All LDAP operations and authorization operations are now logged in this way. univention-python (15.3.1) f9df968048a8 | feat(python): add logging of LDAP operation duration univention-directory-manager-modules (17.3.5) 97025dfc94ea | feat(udm): add logging of authorization operation durations univention-debug-python (14.3.2) 6b653e3061b5 | feat(debug): add log method to log duration of operations univention-debug-python.yaml 6b653e3061b5 | feat(debug): add log method to log duration of operations univention-directory-manager-modules.yaml 97025dfc94ea | feat(udm): add logging of authorization operation durations univention-python.yaml f9df968048a8 | feat(python): add logging of LDAP operation duration
OK tests OK advisory OK univention-directory-manager-modules OK univention-python
<https://errata.software-univention.de/#/?erratum=5.2x278> <https://errata.software-univention.de/#/?erratum=5.2x279> <https://errata.software-univention.de/#/?erratum=5.2x281>