How to change loglevel of OpenLDAP (slapd)

There're two ways for configuring slapd:
  • single file mode via slapd.conf
  • config is split into multiple LDIF files (eg. in /etc/ldap/slapd.d)
In Ubuntu Intrepid you get by default the latter. You can change the loglevel by altering the value of "olcLogLevel" in the file cn=config.ldif (see the manpage for slapd-config for possible values) and restarting slapd, or you can change the loglevel on the fly as described in this post.