mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
log: log-engine slight redesign
The messages are filtered by their type LOG_MSG - plain messages, they escape any (!) log level filtration and go to stdout LOG_ERROR - error messages LOG_WARN - warning messages LOG_INFO - informative messages LOG_DEBUG - debug messages By default the LOG_WARN log level is used, thus LOG_INFO and LOG_DEBUG messages will not appear in output stream. pr_panic helper was replaced with pr_err, pr_warning shorthanded to pr_warn and old printk if rather pr_msg now. Because we share messages between "show" and "dump" actions, before the "show" action proceed we need to tune up log level and set it to LOG_INFO. Also note that printing of VMA and siginfo now became LOG_INFO messages, it was not that correct to print them regardless the log level. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
4
files.c
4
files.c
@@ -81,7 +81,7 @@ static int collect_fd(int pid, struct fdinfo_entry *e)
|
||||
|
||||
nr_fdinfo_list++;
|
||||
if ((nr_fdinfo_list) * sizeof(struct fdinfo_list_entry) >= 4096) {
|
||||
pr_panic("OOM storing fdinfo_list_entries\n");
|
||||
pr_err("OOM storing fdinfo_list_entries\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ static int collect_fd(int pid, struct fdinfo_entry *e)
|
||||
}
|
||||
|
||||
if ((nr_fdinfo_descs + 1) * sizeof(struct fdinfo_desc) >= 4096) {
|
||||
pr_panic("OOM storing fdinfo descriptions\n");
|
||||
pr_err("OOM storing fdinfo descriptions\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user