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

RE: NEW_LOGGING





>It appears that at least the LEVEL argument needs to be available to the
>lutil_log function, so that it can pass it on via syslog(). One way to
>do this would be to provide the level redundantly, once in the macro
>arguments
>and once in the log arguments. (blech)
>

>As another alternative, hard-code the level in individual log functions:
>

>#define        LDAP_LOG_WARNING(subsys, args) do { \
> if (ldap_loglevels[LDAP_SUBSYS_##subsys] >= LDAP_LEVEL_WARNING) \
> lutil_log_warning args; \
> } while(0)

In addition to the LEVEL, it may be usefull to also pass the SUBSYS ID to ldap_log and actually include that in the log message. Currently, if a user specifies multiple SUBSYSTEMs and LEVELs, everything gets logged in the same log file. Therefore it makes it somewhat cumbersome to look for (or grep for) messages from a specific SUBSYSTEM in the log file.

Julius