https://bugs.openldap.org/show_bug.cgi?id=9726
--- Comment #10 from Shawn McKinney smckinney@symas.com --- (In reply to Quanah Gibson-Mount from comment #9)
(In reply to Shawn McKinney from comment #8)
logfile <filename> Specify a file for recording slapd debug messages. By default these messages >only go to stderr, are not recorded anywhere else, and are unrelated to >messages exposed by the loglevel configuration parameter. Specifying a logfile >copies messages to both stderr and the logfile.
Confused by phrasing "and are unrelated to messages exposed by the loglevel configuration parameter". How are they unrelated to the loglevel setting?
It's talking about slapd debug messages, which are separate from loglevel settings:
"Specify a file for recording slapd debug messages."
IOW - Doesn't loglevel always control the granularity of the messages, regardless of whether they are bound for stderr or the logfile?
No, only loglevel messages, not debug messages.
I must be way off the mark because my assumption, 'debug', we're talking about what gets routed to the (new) logfile. stderr messages are routed to syslog.
In light of that, possibly faulty assertion, the loglevel setting controls the level of granularity sent to the debug log (in addition to syslog), per my observations.
e.g. set loglevel 0, and no messages will be sent. loglevel -1 sends all.
What do I have wrong here?
And yes, the 'logFileOnly' flag controls that behavior which is clearly pointed out in the man page and despite what was said on earlier comment.
No, that's not clear at all. What it says is:
"logfile-only on | off Specify that debug messages should only go to the configured logfile, and not to stderr."
Which is talking only about debug messages and says nothing about loglevel messages which by default get sent to syslog.
Again, stderr is what gets routed to syslog -- ? So, if logfile-only on then it's debug only, and no messages sent to syslog (stderr), regardless of what the loglevel is set to.
Obviously, I don't have a firm grasp of openldap log fundamentals. if I'm confused, others must be. So, this is opportunity to make it explicit.