Openldap log records and descriptions

Source: Internet
Author: User
Document directory
  • Logfile

 

Logfile

Openldap logs via syslogd (using local4) in all cases (see loglevel for configuration information on Streaming syslogd LDAP messages to a separate file). In additionLogfileDirective may be used to create a separate file containing just LDAP log information. Even when this directive is used OpenLDAP will also log the same information via syslogd. Example:

logfile /path/to/ldap/log/file

# file must exist prior to starting OpenLDAP
touch /path/to/ldap/log/file
chown ldap:ldap /path/to/ldap/log/file

Loglevel

Openldap logs via syslogd local4. to stream the LDAP log to a separate file from syslog add a line like thisSyslog. conf(Normally/etc/syslog. conf ):

# add to syslog.conf
local4.* /var/log/ldap.log

# create an empty log file
touch /var/log/ldap.log

# restart syslogd
killall -HUP syslogd
OR
/etc/rc.d/syslogd restart

The above command will log all levels of local4 (OpenLDAP) output to/var/log/ldap. log. Alternatively the logfile directive may be used.

The OpenLDAP logging level is set using the following Directive:

loglevel number | hex-value | log-name

The possible valuesNumber,Hex-ValueAndLog-nameAre:

Number Hex-Value Log-name Logging description
-1 0 xFFFF Enable all logging
0 Zero x 0000 - Logging inhibited-no logging occurs including critical errors. not recommended.
1 0x1 ACL Trace function CILS
2 0x2 Packets Debug Packet Handling
4 0x4 ARGs Heavy trace debugging
8 0x8 Conns Connection Management
16 0x10 Ber Print out packets sent and received
32 0x20 Filter Search filter processing
64 0x40 Config Configuration File Processing
128 0x80 ACL Access Control List Processing
256 Zero x 100 Stats Stats log connections/Operations/results
512 Zero X 200 Stats2 Stats log entries sent
1024 Zero X 400 Shell Print communication with Shell backends
2048 Zero x 800 Parse Print entry parsing debugging
4096 Zero X 1000 Cache Caching (unused) g
8192 Zero X 2000 Index Indexing (unused)
16384 Zero X 4000 Sync Print syncrepl (replica) Logging
32768 Zero x 8000 None A misnomer-it will log message that are not categorized including curial messages

The loglevel Directive takes a single value or a space separated list of values, each value may be any combinationNumber,Hex-ValueOrLog-nameFrom the table above. The results are or 'd together. It is also possible to set multiple entries in eitherNumberOrHex-ValueAs shown in the following examples:

loglevel 255
# sets 1, 2, 4, 8, 16, 32, 64 and 128
# adds all the numbers

loglevel 2176
# 2048 + 128
loglevel 296
# 256 + 32 + 8

# using single hex-value (128)
loglevel 0x80

# multiple hex-values (1 + 128)
loglevel 0x81
# same result as
loglevel 0x1 0x80

# using log-name (single value)
loglevel acl

# multiple log-name values
loglevel acl sync

# combined
loglevel 1 0x40 conns

If noLoglevelDirective is defined the log defaults to 256 (Stats only ).

Note:With the-1 setting slapd logs ferocious amounts of data. reduce this value as quickly as possible to only those items you are interested in or buy new discs-lots of new discs.

For more information, see: http://www.zytrax.com/books/ldap/ch6/#loglevel

Start the LDAP debugging mode: slapd-D 256

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.