Questo contenuto non è disponibile nella lingua selezionata.

20.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 20.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 20.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 20.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 20.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 20.11. Set the log level to WARNING on glusterd

In the /etc/sysconfig/glusterd file, locate the LOG_LEVEL parameter and set its value to WARNING.
## 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
Then start or restart the glusterd service. On Red Hat Enterprise Linux 7, run:
# systemctl restart glusterd.service
Copy to Clipboard Toggle word wrap
On Red Hat Enterprise Linux 6, run:
# service glusterd restart
Copy to Clipboard Toggle word wrap
To run a gluster command once with a specified log level
gluster --log-level=ERROR VOLNAME COMMAND
Copy to Clipboard Toggle word wrap

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

# gluster --log-level=ERROR volume status
Copy to Clipboard Toggle word wrap
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat