【问题标题】:How to override the systemd default LogLevel如何覆盖 systemd 默认的 LogLevel
【发布时间】:2016-05-03 00:48:27
【问题描述】:

当我查看文件 /etc/systemd/system.conf 时,我可以看到以下内容:

[Manager]
#LogLevel=info
#LogTarget=journal-or-kmsg
#LogColor=yes
#LogLocation=no

但如果我运行systemctl show -pLogLevel,结果是

LogLevel=notice

我尝试创建一个名为/etc/systemd/system.conf.d 的目录并在其中添加一个my.conf 文件,然后重新启动,但看不到任何变化。

我查看的是正确的配置文件吗?

【问题讨论】:

标签: debian systemd


【解决方案1】:

dropin 系统配置是最近才引入的。我相信您正在运行旧版本的 systemd。

我已在 systemd 226 上测试了您的案例,一切正常。

$>:Development$ systemctl show -pLogLevel
LogLevel=info
$>:Development$ cat /etc/systemd/system.conf | grep LogLevel
#LogLevel=info

【讨论】:

    猜你喜欢
    • 2019-05-09
    • 1970-01-01
    • 2015-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-20
    • 2020-07-12
    相关资源
    最近更新 更多