Log control methods include cluster-level configuration items, tenant-level system variables, SQL hints, and semaphores. These methods can be used to manage and control system log-related behaviors.
Control by using configuration items
Cluster-level configuration items related to system logs:
Configuration item |
Default value |
Description |
|---|---|---|
| enable_syslog_recycle | False | Specifies whether to enable system log recycling. |
| enable_syslog_wf | True | Specifies whether to write system logs above the WARN level to a separate log file (with the .wf suffix). |
| enable_async_syslog | True | Specifies whether to enable asynchronous write of system logs for observer.log, election.log, and rootservice.log. |
| max_syslog_file_count | 0 | Specifies the maximum number of log files that can be retained before recycling. |
| syslog_io_bandwidth_limit | 30MB | Specifies the upper limit of the disk I/O bandwidth that system logs can occupy. System logs that exceed the upper limit are discarded. A value of 0 disables system logging. |
| syslog_level | WDIAG | Specifies the system log level. |
| syslog_disk_size | 0M | Specifies the upper limit of the disk space for system logs. When the total size of system logs approaches this limit, the oldest log file is deleted, including compressed log files. |
| syslog_compress_func | none | Specifies the compression algorithm for system logs. |
| syslog_file_uncompressed_count | 0 | Specifies the number of system log files that are not compressed. This configuration item takes effect only when syslog_compress_func is set to a value other than none. The number is counted separately for each type of system log file. |
| alert_log_level | INFO | Specifies the level of the alert log. |
Control by using system variables
The tenant-level system variable ob_log_level controls the session-level log level. For more information about ob_log_level, see ob_log_level.