Bug 46100 - univention.debug2 is out of sync with univention.debug
univention.debug2 is out of sync with univention.debug
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: univention-debug
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Philipp Hahn
Florian Best
:
: 49339 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-20 21:10 CET by Sönke Schwardt-Krummrich
Modified: 2019-05-29 13:24 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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):
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2018-01-20 21:10:03 CET
There are several log targets missing in univention.debug2 that are available in univention.debug:

--- a/base/univention-debug/python/debug2.py
+++ b/base/univention-debug/python/debug2.py
@@ -60,35 +60,49 @@ SLAPD = 0x05
 SEARCH = 0x06
 TRANSFILE = 0x07
 LISTENER = 0x08
 POLICY = 0x09
 ADMIN = 0x0A
 CONFIG = 0x0B
 LICENSE = 0x0C
 KERBEROS = 0x0D
 DHCP = 0x0E
+PROTOCOL = 0x0F
+MODULE = 0x10
+ACL = 0x11
+RESOURCES = 0x12
+PARSER = 0x13
+LOCALE = 0x14
+AUTH = 0x15
 
 _map_id_old2new = {
 	MAIN: "MAIN",
 	LDAP: "LDAP",
 	USERS: "USERS",
 	NETWORK: "NETWORK",
 	SSL: "SSL",
 	SLAPD: "SLAPD",
 	SEARCH: "SEARCH",
 	TRANSFILE: "TRANSFILE",
 	LISTENER: "LISTENER",
 	POLICY: "POLICY",
 	ADMIN: "ADMIN",
 	CONFIG: "CONFIG",
 	LICENSE: "LICENSE",
 	KERBEROS: "KERBEROS",
 	DHCP: "DHCP",
+	PROTOCOL: "PROTOCOL",
+	MODULE: "MODULE",
+	ACL: "ACL",
+	RESOURCES: "RESOURCES",
+	PARSER: "PARSER",
+	LOCALE: "LOCALE",
+	AUTH: "AUTH",
 }
 
 
 # 13.08.08 13:13:57  LISTENER    ( ERROR   ) : listener: 1
 # 13.08.08 13:13:57  LISTENER    ( WARN    ) : received signal 2
 # 13.08.08 13:14:02  DEBUG_INIT
 _outfmt = '%(asctime)s,%(msecs)d %(name)-11s (%(levelname)-7s): %(message)s'
 _outfmt_syslog = '%(name)-11s (%(levelname)-7s): %(message)s'
 _datefmt = '%d.%m.%Y %H:%M:%S'
Comment 1 Philipp Hahn univentionstaff 2018-04-21 07:19:33 CEST
<https://git.knut.univention.de/univention/ucs/tree/phahn/4.3-0+46100debug2>
 needs to be re-based to merge fixup commits before being merged.
Comment 2 Philipp Hahn univentionstaff 2019-04-24 12:27:00 CEST
*** Bug 49339 has been marked as a duplicate of this bug. ***
Comment 3 Philipp Hahn univentionstaff 2019-05-20 13:50:34 CEST
[4.4-0] c07ab8006f Bug #46100 debug.py: Unify argument names
[4.4-0] f126bcf770 Bug #46100 debug.py: Refactor flushing
[4.4-0] 72013be81a Bug #46100 debug.py: Fix exception handling
[4.4-0] 3870bf230b Bug #46100 debug.py: Remove global declaration
[4.4-0] 3b009c2b82 Bug #46100 debug.py: debug2: add debug2.exit()
[4.4-0] b23a2ffb0e Bug #46100 debug.py: debug2: Adapt output format
[4.4-0] 04e642e601 Bug #46100 debug.py: debug2: Add missing get_level()
[4.4-0] 128e2a2ca3 Bug #46100 debug.py: debug2: Store UCR log level
[4.4-0] f651aa251f Bug #46100 debug.py: debug2: Return File form init()
[4.4-0] 6077464e06 Bug #46100 debug.py: debug2: Add missing log targets
[4.4-0] a93d10c4a6 Bug #49130 debug.py: py3: Make module Python3 compatible

Package: univention-debug-python
Version: 1.0.0-1A~4.4.0.201905201332
Branch: ucs_4.4-0
Scope: errata4.4-0

[4.4-0] f78f7c4d55 Bug #49130: univention-debug 11.0.0-2A~4.4.0.201905171721 Bug #49130: univention-debug-python 1.0.0-1A~4.4.0.201905201308
 doc/errata/staging/univention-debug-python.yaml | 13 +++++++++++++
 doc/errata/staging/univention-debug.yaml        | 11 +++++++++++
 doc/errata/staging/univention-python.yaml       |  2 +-
 3 files changed, 25 insertions(+), 1 deletion(-)

QA: There is a new unit-test tests/test_compare.py to assert the two implementations stay synchronized. That test only checks for symbol names, but not equal functionality, as the APIs are slightly different. Compare "tests/test_debug.py" with "tests/test_debug2.py" to get the differences.
Comment 4 Florian Best univentionstaff 2019-05-20 18:12:25 CEST
OK: code unified
OK: YAML
>>> set(vars(univention.debug).keys()) - set(vars(univention.debug2).keys())
set(['begin', 'end', '_debug'])
Comment 5 Arvid Requate univentionstaff 2019-05-29 13:24:14 CEST
<http://errata.software-univention.de/ucs/4.4/120.html>