mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
criu: call compel_log_init() at start
Otherwise, messages printed by libcompel are omitted from logs. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
a9c99c09a0
commit
48be6e55d4
@@ -706,6 +706,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||
if (log_init(opts.output))
|
||||
return 1;
|
||||
libsoccr_set_log(log_level, print_on_level);
|
||||
compel_log_init(vprint_on_level, log_get_loglevel());
|
||||
|
||||
pr_debug("Version: %s (gitid %s)\n", CRIU_VERSION, CRIU_GITID);
|
||||
if (opts.deprecated_ok)
|
||||
|
@@ -7,6 +7,10 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
extern void vprint_on_level(unsigned int loglevel, const char *format,
|
||||
va_list params);
|
||||
|
||||
#endif /* CR_NOGLIBC */
|
||||
|
||||
|
@@ -209,7 +209,7 @@ unsigned int log_get_loglevel(void)
|
||||
return current_loglevel;
|
||||
}
|
||||
|
||||
static void __print_on_level(unsigned int loglevel, const char *format, va_list params)
|
||||
void vprint_on_level(unsigned int loglevel, const char *format, va_list params)
|
||||
{
|
||||
int fd, size, ret, off = 0;
|
||||
int __errno = errno;
|
||||
@@ -246,7 +246,7 @@ void print_on_level(unsigned int loglevel, const char *format, ...)
|
||||
va_list params;
|
||||
|
||||
va_start(params, format);
|
||||
__print_on_level(loglevel, format, params);
|
||||
vprint_on_level(loglevel, format, params);
|
||||
va_end(params);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user