Bug 26218 - Viele unnötige Debugmeldungen in /var/log/univention/management-console-module-udm.log
Summary: Viele unnötige Debugmeldungen in /var/log/univention/management-console-modul...
Status: RESOLVED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: univention-debug
Version: UCS 4.1
Hardware: Other Linux
: P5 enhancement
Target Milestone: ---
Assignee: UCS maintainers
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 51920
  Show dependency treegraph
 
Reported: 2012-02-22 15:53 CET by Tim Petersen
Modified: 2020-08-27 17:47 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.011
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2012022221001026
Bug group (optional): External feedback
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 Tim Petersen univentionstaff 2012-02-22 15:53:25 CET
An Ticket #2012022221001026 ist aufgefallen, dass in den Standard Debugleveln in UCS 3.0 sehr viele unnötige Informationen aus dem UDM-Modul gelogged werden.

Kurzer Auszug aus der /var/log/univention/management-console-module-udm.log:
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = dnsEntryZoneReverse
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = dnsEntryZoneReverse
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = dnsEntryZoneReverse
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = dnsEntryZoneReverse
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = dnsEntryZoneReverse
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = dnsEntryZoneReverse
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = name
UNIVENTION_DEBUG_BEGIN  : admin.handlers.base.__getitem__ key = dnsEntryZoneAlias
UNIVENTION_DEBUG_END    : admin.handlers.base.__getitem__ key = dnsEntryZoneAlias

Man könnte hier evt. einmal prüfen, inwieweit diese Meldungen notwendig sind, oder durch ein alternatives Debuglevel unterdrückt werden können.
Comment 1 Daniel Tröder univentionstaff 2017-01-18 10:37:10 CET
Beim Lesen der logfiles sind diese Meldungen extrem störend.

In das listener.log werden die gleichen Meldungen geschrieben:

# grep -c admin.handlers.base.__getitem__ /var/log/univention/*.log | egrep -v ':0$'
/var/log/univention/directory-manager-cmd.log:3030
/var/log/univention/listener.log:24874

Sie stammen von management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py:267

Das Gleiche gilt für die Ausgabe 
------------------------------------------
UNIVENTION_DEBUG_BEGIN  : uldap.searchDn filter=(&(cn=*)(|(objectClass=univentionGroup)(objectClass=sambaGroupMapping))(uniqueMember=uid=user50,cn=users,dc=uni,dc=dtr)) base= scope=sub unique=0 required=0
UNIVENTION_DEBUG_END    : uldap.searchDn filter=(&(cn=*)(|(objectClass=univentionGroup)(objectClass=sambaGroupMapping))(uniqueMember=uid=user50,cn=users,dc=uni,dc=dtr)) base= scope=sub unique=0 required=0
------------------------------------------
die bei jedem Zugriff auf eine groups/group geloggt wird.

# grep -c 'UNIVENTION_DEBUG_BEGIN  : uldap.searchDn' /var/log/univention/*.log | egrep -v '0$'
/var/log/univention/listener.log:4066

Die Meldungen stammen von base/univention-python/modules/uldap.py:300


Das Problem:
univention.debug.function loggt via /base/univention-debug/lib/debug.c univention_debug_begin()/end(), was keine loglevel unterstützt.

Mögliche Lösung:
In univention_debug_begin() univention_debug() statt fprintf() verwenden.
Comment 2 Florian Best univentionstaff 2017-01-18 11:44:10 CET
Are they printed even if debug-function level is disabled?
Comment 3 Daniel Tröder univentionstaff 2017-01-18 13:09:06 CET
It is printed even with listener/debug/level=0 (and directory/manager/cmd/debug/level=0).

univention_debug_begin()/end() do not support debug levels.
Comment 4 Florian Best univentionstaff 2017-01-18 13:10:29 CET
Isn't there a equivalent like:

connector/debug/function: <empty>
 If the variable is set to '1' function calls are logged as additional debug information. If the variable is set to '0' or unset no calls are logged.
Comment 5 Florian Best univentionstaff 2017-01-18 13:41:31 CET
diff --git a/management/univention-directory-listener/src/main.c b/management/univention-directory-listener/src/main.c
index 8d2f11d..9e19108 100644
--- a/management/univention-directory-listener/src/main.c
+++ b/management/univention-directory-listener/src/main.c
@@ -470,6 +470,7 @@ int main(int argc, char* argv[])
 
 »   univention_debug_set_level(UV_DEBUG_LISTENER, debugging);
 »   univention_debug_set_level(UV_DEBUG_LDAP, debugging);
+»   univention_debug_set_function(0);
 
 »   {
 »   »   char filename[PATH_MAX];
Comment 6 Florian Best univentionstaff 2017-01-18 14:11:55 CET
(In reply to Florian Best from comment #5)
univention_debug_set_function(univention_config_get_int("listener/debug/function/level"));
Comment 7 Stefan Gohmann univentionstaff 2019-01-03 07:19:46 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.