mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
ITS#8889 - Clarify loglevel and debug level portions of admin guide.
This commit is contained in:
parent
5f9352986d
commit
4e0f0a311d
@ -132,9 +132,8 @@ Level Keyword Description
|
||||
|
||||
You may enable multiple levels by specifying the debug option once for each desired level. Or, since debugging levels are additive, you can do the math yourself. That is, if you want to trace function calls and watch the config file being processed, you could set level to the sum of those two levels (in this case, {{EX: -d 65}}). Or, you can let slapd do the math, (e.g. {{EX: -d 1 -d 64}}). Consult {{F: <ldap_log.h>}} for more details.
|
||||
|
||||
Note: slapd must have been compiled with {{EX:--enable-debug}}
|
||||
defined for any debugging information beyond the two stats levels
|
||||
to be available (the default).
|
||||
Note: slapd must have been compiled with {{EX:--enable-debug}}, which is the default,
|
||||
for any debugging information other than the stats and stats2 levels to be available as options.
|
||||
|
||||
|
||||
H2: Starting slapd
|
||||
|
@ -174,19 +174,17 @@ disables this feature.
|
||||
|
||||
H4: olcLogLevel: <level>
|
||||
|
||||
This directive specifies the level at which debugging statements
|
||||
and operation statistics should be syslogged (currently logged to
|
||||
This directive specifies the level at which log statements
|
||||
and operation statistics should be sent to syslog (currently logged to
|
||||
the {{syslogd}}(8) {{EX:LOG_LOCAL4}} facility). You must have
|
||||
configured OpenLDAP {{EX:--enable-debug}} (the default) for this
|
||||
to work (except for the two statistics levels, which are always
|
||||
enabled). Log levels may be specified as integers or by keyword.
|
||||
to work, except for the two statistics levels, which are always
|
||||
enabled. Log levels may be specified as integers or by keyword.
|
||||
Multiple log levels may be used and the levels are additive.
|
||||
To display what levels
|
||||
correspond to what kind of debugging, invoke slapd with {{EX:-d?}}
|
||||
or consult the table below. The possible values for <level> are:
|
||||
The possible values for <level> are:
|
||||
|
||||
!block table; colaligns="RL"; align=Center; \
|
||||
title="Table 5.1: Debugging Levels"
|
||||
title="Table 5.1: Logging Levels"
|
||||
Level Keyword Description
|
||||
-1 any enable all debugging
|
||||
0 no debugging
|
||||
@ -203,7 +201,7 @@ Level Keyword Description
|
||||
1024 (0x400 shell) print communication with shell backends
|
||||
2048 (0x800 parse) print entry parsing debugging
|
||||
16384 (0x4000 sync) syncrepl consumer processing
|
||||
32768 (0x8000 none) only messages that get logged whatever log level is set
|
||||
32768 (0x8000 none) only messages that get logged regardless of configured log level
|
||||
!endblock
|
||||
|
||||
The desired log level can be input as a single integer that
|
||||
@ -222,8 +220,7 @@ are equivalent.
|
||||
|
||||
E: olcLogLevel -1
|
||||
|
||||
This will cause lots and lots of debugging information to be
|
||||
logged.
|
||||
This will enable all log levels.
|
||||
|
||||
E: olcLogLevel conns filter
|
||||
|
||||
@ -239,9 +236,7 @@ differs from setting the log level to 0, when no logging occurs. At least the
|
||||
|
||||
E: olcLogLevel stats
|
||||
|
||||
Basic stats logging is configured by default. However, if no olcLogLevel is
|
||||
defined, no logging occurs (equivalent to a 0 level).
|
||||
|
||||
Basic stats logging is configured by default.
|
||||
|
||||
H4: olcReferral <URI>
|
||||
|
||||
|
@ -130,18 +130,17 @@ loop detection is done.
|
||||
|
||||
H4: loglevel <level>
|
||||
|
||||
This directive specifies the level at which debugging statements
|
||||
and operation statistics should be syslogged (currently logged to
|
||||
This directive specifies the level at which log statements
|
||||
and operation statistics should be sent to syslog (currently logged to
|
||||
the {{syslogd}}(8) {{EX:LOG_LOCAL4}} facility). You must have
|
||||
configured OpenLDAP {{EX:--enable-debug}} (the default) for this
|
||||
to work (except for the two statistics levels, which are always
|
||||
enabled). Log levels may be specified as integers or by keyword.
|
||||
Multiple log levels may be used and the levels are additive. To display what
|
||||
numbers correspond to what kind of debugging, invoke slapd with {{EX:-d?}}
|
||||
or consult the table below. The possible values for <integer> are:
|
||||
to work, except for the two statistics levels, which are always
|
||||
enabled. Log levels may be specified as integers or by keyword.
|
||||
Multiple log levels may be used and the levels are additive.
|
||||
The possible values for <integer> are:
|
||||
|
||||
!block table; colaligns="RL"; align=Center; \
|
||||
title="Table 6.1: Debugging Levels"
|
||||
title="Table 6.1: Logging Levels"
|
||||
Level Keyword Description
|
||||
-1 any enable all debugging
|
||||
0 no debugging
|
||||
@ -158,7 +157,7 @@ Level Keyword Description
|
||||
1024 (0x400 shell) print communication with shell backends
|
||||
2048 (0x800 parse) print entry parsing debugging
|
||||
16384 (0x4000 sync) syncrepl consumer processing
|
||||
32768 (0x8000 none) only messages that get logged whatever log level is set
|
||||
32768 (0x8000 none) only messages that get logged regardless of configured log level
|
||||
!endblock
|
||||
|
||||
The desired log level can be input as a single integer that
|
||||
@ -177,8 +176,7 @@ are equivalent.
|
||||
|
||||
E: loglevel -1
|
||||
|
||||
This will cause lots and lots of debugging information to be
|
||||
logged.
|
||||
This will enable all log levels.
|
||||
|
||||
E: loglevel conns filter
|
||||
|
||||
@ -194,8 +192,7 @@ differs from setting the log level to 0, when no logging occurs. At least the
|
||||
|
||||
E: loglevel stats
|
||||
|
||||
Basic stats logging is configured by default. However, if no loglevel is
|
||||
defined, no logging occurs (equivalent to a 0 level).
|
||||
Basic stats logging is configured by default.
|
||||
|
||||
H4: objectclass <{{REF:RFC4512}} Object Class Description>
|
||||
|
||||
|
@ -90,8 +90,8 @@ H2: Debugging {{slapd}}(8)
|
||||
After reading through the above sections and before e-mailing the OpenLDAP lists, you
|
||||
might want to try out some of the following to track down the cause of your problems:
|
||||
|
||||
* Loglevel stats (256) is generally a good first loglevel to try for getting
|
||||
information useful to list members on issues
|
||||
* A loglevel of stats (256) is generally a good first loglevel to use for getting
|
||||
information useful to list members on issues. This is the default loglevel if none is configured.
|
||||
* Running {{slapd -d -1}} can often track down fairly simple issues, such as
|
||||
missing schemas and incorrect file permissions for the {{slapd}} user to things like certs
|
||||
* Check your logs for errors, as discussed at {{URL:http://www.openldap.org/faq/data/cache/358.html}}
|
||||
|
@ -86,7 +86,7 @@ Each attribute index can be tuned further by selecting the set of index types to
|
||||
|
||||
General rule: don't go overboard with indexes. Unused indexes must be maintained and hence can only slow things down.
|
||||
|
||||
See {{slapd.conf}}(8) and {{slapdindex}}(8) for more information
|
||||
See {{slapd.conf}}(5) and {{slapdindex}}(8) for more information
|
||||
|
||||
|
||||
H3: Presence indexing
|
||||
@ -148,7 +148,8 @@ The default of {{loglevel stats}} (256) is really the best bet. There's a coroll
|
||||
this when problems *do* arise, don't try to trace them using syslog.
|
||||
Use the debug flag instead, and capture slapd's stderr output. syslog is too
|
||||
slow for debug tracing, and it's inherently lossy - it will throw away messages when it
|
||||
can't keep up.
|
||||
can't keep up. See {{slapd.conf}}(5) or {{slapd-config}}(5) for more information on
|
||||
how to configure the loglevel.
|
||||
|
||||
Contrary to popular belief, {{loglevel 0}} is not ideal for production as you
|
||||
won't be able to track when problems first arise.
|
||||
|
Loading…
Reference in New Issue
Block a user