80后技术男
分类:
2007-05-10 03:03:43
要查OpenLDAP的log,必須先在/etc/syslog.conf裏加上一行:
local4.* /var/log/ldap.log
然後touch /var/log/ldap.log,重啟syslog,就有slapd的log可查了。
不過要注意,loglevel預設值為256,只記錄狀態(stats only),若要記錄其他東西,必須設loglevel值。其中-1是記錄所有除錯信息,小心ldap.log變得太大。
| loglevel | Logging description |
| -1 | enable all debugging |
| 0 | no debugging |
| 1 | trace function calls |
| 2 | debug packet handling |
| 4 | heavy trace debugging |
| 8 | connection management |
| 16 | print out packets sent and received |
| 32 | search filter processing |
| 64 | configuration file processing |
| 128 | access control list processing |
| 256 | stats log connections/operations/results |
| 512 | stats log entries sent |
| 1024 | print communication with shell backends |
| 2048 | print entry parsing debugging |