Bug 58644 - Make log emitting more compatible to structured logging
Summary: Make log emitting more compatible to structured logging
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: General
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.2-3-errata
Assignee: Florian Best
QA Contact: Felix Botner
URL:
Keywords:
Depends on: 58627 58647
Blocks:
  Show dependency treegraph
 
Reported: 2025-09-15 12:27 CEST by Florian Best
Modified: 2025-09-30 16:41 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, Troubleshooting
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2025-09-15 12:27:00 CEST
Several components should be adjusted for a more compliant logging.

E.g.:
1. Univention Debug has a new level TRACE (5) which must be allowed to configure via UCR.

2. `log.error('Error: %s', traceback.format_exc())` loggs tracebacks in a wrong format. log.exception('Error') must be used instead.

3. `log.info('foo %s' % (user_input,))` doesn't do lazy-evaluation and allows user input to break log format.

4. The method "warn" in python-logging is deprecated and should be "warning" instead.

5. etc.?
Comment 1 Florian Best univentionstaff 2025-09-16 23:06:23 CEST
The following files (besides UMC core) are affected by invalid structural traceback logging:
 base/univention-system-setup/umc/python/setup/__init__.py                                            | 4 ++--
 management/univention-management-console-module-adtakeover/umc/python/adtakeover/takeover.py         | 6 ++----
 management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/12_proxy.py | 5 ++---
 management/univention-management-console-module-join/umc/python/join/__init__.py                     | 4 ++--
 management/univention-management-console-module-udm/umc/python/udm/__init__.py                       | 3 +--
 services/univention-admin-diary/python/admindiary/client.py                                          | 4 +---
Comment 2 Florian Best univentionstaff 2025-09-22 16:01:26 CEST
The logging of various components have been adjusted:

univention-updater.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-updater (17.3.1)
46a6a6740641 | style(updater): make logging compatible to structured logging

univention-system-setup.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-system-setup (15.3.0)
583773c9b4a7 | style(system-setup): make logging compatible to structured logging

univention-self-service.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-self-service (7.3.0)
00e39f163200 | style(self-service): make logging compatible to structured logging

univention-s4-connector.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-policy (13.3.0)
0ee7124281c4 | feat(policy): enable structured logging in univention-policy/univention-license

univention-management-console-module-udm (12.3.0)
07e2fffe93ed | style(umc-udm): make logging compatible to structured logging

univention-management-console-module-join.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-management-console-module-join (14.3.0)
058defa28d24 | style(join): make logging compatible to structured logging

univention-management-console-module-diagnostic.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-management-console-module-diagnostic (8.3.4)
71a140df2465 | style(umc-diagnostic): make logging compatible to structured logging

univention-management-console-module-adtakeover.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-management-console-module-adtakeover (9.3.0)
e617da6e297b | style(adtakeover): make logging compatible to structured logging

univention-licence (13.3.0)
0ee7124281c4 | feat(policy): enable structured logging in univention-policy/univention-license

univention-ipcalc.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-ipcalc (13.3.0)
856c74992944 | build(ipcalc): remove usr/lib/python3/dist-packages/.coverage from package

univention-directory-notifier.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-directory-notifier (16.3.0)
85c9627b196a | feat(notifier): add configuration for structured logging

univention-directory-listener.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-directory-listener (16.3.0)
b2882d78abb5 | feat(listener): add configuration for structured logging

univention-config-registry (17.3.0)
9c5ac014799e | feat(config-registry): add univention_config_is_true

univention-appcenter.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-appcenter (11.3.2)
ac7c7b2ad502 | style(appcenter): make logging compatible to structured logging

univention-admin-diary (4.3.0)
dc7d249eb326 | feat(admin-diary): make compatible with structured logging

univention-ad-connector.yaml
4446fc5f7191 | chore(logging-compat): update advisory

univention-ad-connector (16.4.0)
b609e27e2cc4 | feat(ad-connector): add configuration for structured logging

ucslint (11.3.0)
0006e30091c6 | style(ucslint): use lazy log evaluation

ucs-test (12.3.5)
f0bcc0ceae6e | style(ucs-test): use lazy log evaluation
Comment 3 Felix Botner univentionstaff 2025-09-25 11:44:05 CEST
OK - changes
OK - yaml
OK - tests
Comment 5 Christian Castens univentionstaff 2025-09-25 16:44:42 CEST
<https://errata.software-univention.de/#/?erratum=5.2x239>
Comment 6 Christian Castens univentionstaff 2025-09-30 16:41:58 CEST
<https://errata.software-univention.de/#/?erratum=5.2x242>