Name
log — Configures and displays the logs.
Syntax
log [show [LOG_LEVEL] [NUM_LINES]
log [fwd [<IP:PORT>] [test]]
log [clear]
log [config <option> <value> <--enable | --disable>]
Options
- No option
Displays the complete log message history of the Daemon and System Event Logs.
showShows logs with the specified priority or lower (lower is more severe).
LOG_LEVELSpecifies the log level to be displayed.
Options include:
allDisplays all log levels messages.
criticalDisplays logs of critical level messages.
errorDisplays logs of error-level messages.
warningDisplays logs of warning-level messages.
noticeDisplays logs of notice-level messages.
infoDisplays logs of info-level messages.
NUM_LINESSpecifies the number of lines to show.
fwdGenerates a test CSM event or specifies the IP/FQDN and port for log forwarding.
Options include:
<IP:PORT>Specifies the IP/FQDN and port where logs should be forwarded.
testGenerates a test CSM event.
clearClears logs of specified types.
Options include:
- No option
Clears all System Event and Daemon logs.
allClears both System Event and Daemon logs.
selClears only the System Event Log.
daemonClears only the Daemon logs.
config <option> <value>Sets various configuration options and values for log retention and storage.
Options include:
MaxRetentionSecSets the maximum time to store journal entries.
TIMEValue range: 86400 – 31536000 seconds
Note
This range equates to 24 hours – 1 year.
SystemMaxUseSets the maximum disk space the journal may use. Units: Bytes, Kilobytes (K), Megabytes (M).
SIZEValues: 100K – 64M
SystemMaxFileSizeSets the maximum size of individual journal files. Units: Bytes, Kilobytes (K), Megabytes (M).
SIZEValues: 10K – 16M
MaxLevelStoreSets the log level of messages to store.
Values include:
errorShows logs of error- level messages.
warningShows logs of warning-level messages.
noticeShows logs of notice-level messages.
infoShows logs of info-level messages.
debugStores debug-level messages.
--enableEnables configuration changes.
--disableDisables configuration changes.
Examples
log show error log show warning 10 log fwd 192.168.1.100:514 log fwd test log clear all log config MaxRetentionSec 86400 --enable log config SystemMaxUse 100k --disable log config MaxLevelStore debug log config SystemMaxFileSize 10M