[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: slapd logging

I'd like to see a well thought out logging design... (and, no,
I'm not volunteering :-).

One approach would be to have:
	1) a global "level" (e.g. critical,error,notice,info,debug,noise)
	2) per subsystem levels (same levels as above) where each
	library (lber,ldap,lutil,etc), each backend, plus ACL, schema

Each log message would be written like:
	Log( LOG_SUBSYS, LOG_LEVEL, "format", ...);

The check would be:
	( level >= global_level || level >= subsys_level[subsys] )

and would be enabled using:
	-l level
	-l subsys:level
	-l subsysA,subsysB:levelX;subsysC:levelY;level
and/or as multiple, combined arguments.

There are other workable alternatives...