Bug 46342 - Reduce debug messages from mod_authnz_ldap
Summary: Reduce debug messages from mod_authnz_ldap
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_authn_ldap (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P4 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2008-12-04 12:14 UTC by Dan Poirier
Modified: 2009-01-08 20:18 UTC (History)
0 users



Attachments
Patch to reduce the number of debug messages (3.21 KB, patch)
2008-12-04 12:14 UTC, Dan Poirier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Poirier 2008-12-04 12:14:17 UTC
Created attachment 22993 [details]
Patch to reduce the number of debug messages

Using mod_authnz_ldap with loglevel debug results in 8 messages every time an LDAP URL is parsed.  Because this happens early in startup, these go to stderr, and on Windows create a separate error event in the event log for every message, which is worse.  It also shows up when you do "apachectl -k stop".

I'm not sure this information needs to be logged at all (maybe left over from when this code was developed?).  But if we do want it logged, at least we can cut down the number of messages from 8 to 1, which will greatly reduce the clutter in the Windows event log.

The patch provided collapses the information from the 8 separate messages into a single message.  Instead of

[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(918): [1160] auth_ldap url parse: `ldap://example.com/o=apache,c=US?cn?sub?'
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(927): [1160] auth_ldap url parse: Host: example.com
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(929): [1160] auth_ldap url parse: Port: 389
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(931): [1160] auth_ldap url parse: DN: o=apache,c=US
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(933): [1160] auth_ldap url parse: attrib: cn
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(935): [1160] auth_ldap url parse: scope: subtree
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(940): [1160] auth_ldap url parse: filter: (null)
[Thu Dec 04 14:14:15 2008] [debug] mod_authnz_ldap.c(1016): LDAP: auth_ldap not using SSL connections

the output is one line like this

[Thu Dec 04 14:05:06 2008] [debug] mod_authnz_ldap.c(999): [1651] auth_ldap url parse: `ldaps://example.com:636/o=apache,c=US?cn?sub?', Host: example.com:636, Port: 636, DN: o=apache,c=US, attrib: cn, scope: subtree, filter: (null), connection mode: SSL
Comment 1 Paul J. Reder 2009-01-08 20:18:46 UTC
Committed to trunk and submitted for backporting.