此内容没有您所选择的语言版本。

12.4. Configuring the Log Level


Every log message has a log level associated with it. The levels, in descending order, are CRITICAL, ERROR, WARNING, INFO, DEBUG, and TRACE. Red Hat Gluster Storage can be configured to generate log messages only for certain log levels. Only those messages that have log levels above or equal to the configured log level are logged.
For example, if the log level is set to INFO, only CRITICAL, ERROR, WARNING, and INFO messages are logged.
The components can be configured to log at one of the following levels:
  • CRITICAL
  • ERROR
  • WARNING
  • INFO
  • DEBUG
  • TRACE

Important

Setting the log level to TRACE or DEBUG generates a very large number of log messages and can lead to disks running out of space very quickly.
To configure the log level on bricks
# gluster volume set VOLNAME diagnostics.brick-log-level <value>
Copy to Clipboard Toggle word wrap

Example 12.7. Set the log level to warning on a brick

# gluster volume set testvol diagnostics.brick-log-level WARNING
Copy to Clipboard Toggle word wrap
To configure the syslog level on bricks
# gluster volume set VOLNAME diagnostics.brick-sys-log-level <value>
Copy to Clipboard Toggle word wrap

Example 12.8. Set the syslog level to warning on a brick

# gluster volume set testvol diagnostics.brick-sys-log-level WARNING
Copy to Clipboard Toggle word wrap
To configure the log level on clients
# gluster volume set VOLNAME diagnostics.client-log-level <value>
Copy to Clipboard Toggle word wrap

Example 12.9. Set the log level to error on a client

# gluster volume set testvol diagnostics.client-log-level ERROR
Copy to Clipboard Toggle word wrap
To configure the syslog level on clients
# gluster volume set VOLNAME diagnostics.client-sys-log-level <value>
Copy to Clipboard Toggle word wrap

Example 12.10. Set the syslog level to error on a client

# gluster volume set testvol diagnostics.client-sys-log-level ERROR
Copy to Clipboard Toggle word wrap
To configure the log level for glusterd persistently
Edit the /etc/sysconfig/glusterd file, and set the value of the LOG_LEVEL parameter to the log level that you want glusterd to use.
## Set custom log file and log level (below are defaults)
#LOG_FILE='/var/log/glusterfs/glusterd.log'
LOG_LEVEL='VALUE'
Copy to Clipboard Toggle word wrap
This change does not take effect until glusterd is started or restarted with the service or systemctl command.

Example 12.11. Set the log level to WARNING on glusterd

Run the following commands to set the log level to WARNING:
  1. Edit the glusterd service file:
    On Red Hat Enterprise 7(RHEL 7) and RHEL 8, the glusterd service file is available at /usr/lib/systemd/system/glusterd.service
    On RHEL 6, the glusterd service file is available at /etc/sysconfig/glusterd

    Important

    Red Hat Gluster Storage is not supported on Red Hat Enterprise Linux 6 (RHEL 6) from 3.5 Batch Update 1 onwards. See Version Details table in section Red Hat Gluster Storage Software Components and Versions of the Installation Guide
  2. Change the LOG_LEVEL variable to the required debug level.
    ## Set custom log file and log level (below are defaults)
                     #LOG_FILE='/var/log/glusterfs/glusterd.log'
                     LOG_LEVEL='WARNING'
    Copy to Clipboard Toggle word wrap
  3. Reload the daemon:
    On RHEL 7 and RHEL 8, run
    systemctl daemon-reload
    Copy to Clipboard Toggle word wrap
    On RHEL 6, run
    service glusterd reload
    Copy to Clipboard Toggle word wrap

    Important

    Red Hat Gluster Storage is not supported on Red Hat Enterprise Linux 6 (RHEL 6) from 3.5 Batch Update 1 onwards. See Version Details table in section Red Hat Gluster Storage Software Components and Versions of the Installation Guide
  4. Restart the glusterd service.
    On RHEL 7 and RHEL 8, run
    systemctl restart glusterd
    Copy to Clipboard Toggle word wrap
    On RHEL 6, run
    service glusterd restart
    Copy to Clipboard Toggle word wrap

    Important

    Red Hat Gluster Storage is not supported on Red Hat Enterprise Linux 6 (RHEL 6) from 3.5 Batch Update 1 onwards. See Version Details table in section Red Hat Gluster Storage Software Components and Versions of the Installation Guide

Example 12.12. Run volume status with a log level of ERROR

# gluster --log-level=ERROR volume status
Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat