首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在slapd.d中设置日志级别?

如何在slapd.d中设置日志级别?
EN

Unix & Linux用户
提问于 2023-04-14 10:07:42
回答 1查看 60关注 0票数 0

我已经在Debian 11上设置了openLDAP 2.4,我想要更改一些参数,比如日志级别和日志文件,这看起来非常简单:

代码语言:javascript
运行
复制
# man slapd.conf
SLAPD.CONF(5)                                                       File Formats Manual                                                      SLAPD.CONF(5)

NAME
       slapd.conf - configuration file for slapd, the stand-alone LDAP daemon

SYNOPSIS
       /etc/ldap/slapd.conf

DESCRIPTION
       The  file /etc/ldap/slapd.conf contains configuration information for the slapd(8) daemon.  This configuration file is also used by the SLAPD tools
       slapacl(8), slapadd(8), slapauth(8), slapcat(8), slapdn(8), slapindex(8), and slaptest(8).
...
       logfile <filename>
              Specify a file for recording debug log messages. By default these messages only go to stderr and are not recorded anywhere else.  Specifying
              a logfile copies messages to both stderr and the logfile.

       loglevel <integer> [...]
              Specify  the level at which debugging statements and operation statistics should be syslogged (currently logged to the syslogd(8) LOG_LOCAL4
              facility).  They must be considered subsystems rather than increasingly verbose log levels.  Some messages with higher priority  are  logged
...

除了没有名为slapd.conf的文件之外,它已经被更整洁的/etc/ldap/slapd.d替换了。但是,我没有找到关于slapd.conf参数是如何融入/etc/ldap/slapd.d的描述;/etc/ldap/slapd.d/cn=config.ldif中有一个名为olcLogLevel的参数,很可能是这个参数,但是slapd.conf中的其他内容如何呢?

总之,我的问题是:如何更改新方案中的日志级别和日志文件?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2023-04-14 15:07:25

请参阅slapd-config(5)手册页面。几乎所有的设置都在LDAP配置后端保留相同的名称,只使用olc名称空间前缀。(你真的应该通过LDAP或者至少通过slapmodify来编辑这些内容,而不是手工编辑。)

代码语言:javascript
运行
复制
       olcLogFile: <filename>
              Specify a file for recording slapd debug messages. By default these  mes‐
              sages  only  go  to stderr, are not recorded anywhere else, and are unre‐
              lated to messages exposed by  the  olcLogLevel  configuration  parameter.
              Specifying a logfile copies messages to both stderr and the logfile.

       olcLogFileFormat: debug | syslog-utc | syslog-localtime
              Specify  the prefix format for messages written to the logfile. The debug

       [...]

       olcLogLevel: <integer> [...]
              Specify the level at which debugging statements and operation  statistics
              should be syslogged (currently logged to the syslogd(8) LOG_LOCAL4 facil‐
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/742890

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档