CLI: Logging
You can use the logging command to configure logging parameters and to show the system logs. You can use the show log command to view the logs files. The appliance logs activities to a set of system log files.
Configuring logging parameters
logging {files|local|receive|fields|format|level|trap|<hostname or IP-address>}
logging files rotation {criteria {frequency|size|size-pct} | force}
- rotation criteria frequency {daily|weekly|monthly} - Rotate log files on a fixed schedule.
- daily - Once per day at midnight.
- weekly - Once per week
- monthly - On the first day of every month
- rotation criteria size <megabytes> - Rotate the log files when the log file surpasses a specified size threshold.
- rotation criteria size-pct <percentage> - Rotate the logs when they surpass a specified percentage of the disk size.
- rotation force - Force an immediate rotation of the log files.
logging files rotation max-num <number>
logging files delete {current|oldest}
- delete current - Delete the current active log file
- delete oldest [<number>] - Delete one or more of the oldest log files. If deleting more than one file, specify the number of files to delete.
logging local {none|emerg|alert|crit|err|}warning|notice|info|debug|override}
- none - Disable logging
- emerg - Emergency: system is unstable
- alert - Action must be taken immediately
- crit - Critical conditions
- err - Error conditions
- warning - Warning conditions
- notice - Normal but significant conditions
- info - Informational messages
- debug - Debug-level messages
- override class <class> priority - Override log levels on a per-class basis
logging receive
logging fields seconds {enable|fractional-digits|whole-digits}
- seconds enable - Enable the seconds field
- seconds fractional-digits {1|2|3|6} - Specify the number of digits to the right of the decimal point (truncation is from the right)
- seconds whole-digits {1|6|all} - Specify the number of digits the left of the decimal point (truncation is from the left)
- all - Do not limit the number of digits.
logging format {standard|welf}
- format standard - Use the standard format for log messages
- welf - Use WELF format for log messages
logging level cli commands {none|emerg|alert|crit|err|warning|notice|info|debug}
- none - Disable logging
- emerg - Emergency: system is unstable
- alert - Action must be taken immediately
- crit - Critical conditions
- err - Error conditions
- warning - Warning conditions
- notice - Normal but significant conditions
- info - Informational messages
- debug - Debug-level messages
logging <hostname or IPv4 address>
logging trap {none|emerg|alert|crit|err|warning|notice|info|debug}
- none - Disable logging
- emerg - Emergency: system is unstable
- alert - Action must be taken immediately
- crit - Critical conditions
- err - Error conditions
- warning - Warning conditions
- notice - Normal but significant conditions
- info - Informational messages
- debug - Debug-level messages
Viewing log files
show log [continuous] {matching|not matchin} <regex>
- show log - Show entire log file
- continuous - Show the log file as it gets updated
- matching <regex> - Show event logs that match a given regular expression
- not matching <regex> - Show event logs that do not match a given regular expression
show log files
show log files <file number> [{matching| not matching} <regex>]
- <file number> - The number that identifies the log file
- matching <regex> - View entries from the selected log file that matches a given regular expression
- not matching <regex> - View entries from the selected log file that does not match a given regular expression