From: Pallavi Kadam Date: Wed, 6 May 2020 01:30:32 +0000 (-0700) Subject: eal/windows: support logging X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5ebf83784d5d243e74ab1f4933182350c5aaebb0;p=dpdk.git eal/windows: support logging Initialize logging on Windows to send log output to the console. Signed-off-by: Pallavi Kadam Reviewed-by: Ranjit Menon Reviewed-by: Tasnim Bashar Tested-by: Dmitry Kozlyuk Tested-by: Narcisa Vasile Acked-by: Narcisa Vasile --- diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c index 2cf7a04eff..d084606a66 100644 --- a/lib/librte_eal/windows/eal.c +++ b/lib/librte_eal/windows/eal.c @@ -227,6 +227,8 @@ rte_eal_init(int argc, char **argv) { int i, fctret; + rte_eal_log_init(NULL, 0); + eal_log_level_parse(argc, argv); /* create a map of all processors in the system */ diff --git a/lib/librte_eal/windows/eal_log.c b/lib/librte_eal/windows/eal_log.c new file mode 100644 index 0000000000..875981f139 --- /dev/null +++ b/lib/librte_eal/windows/eal_log.c @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2017-2018 Intel Corporation + */ + +#include "eal_private.h" + +/* set the log to default function, called during eal init process. */ +int +rte_eal_log_init(__rte_unused const char *id, __rte_unused int facility) +{ + rte_openlog_stream(stderr); + + eal_log_set_default(stderr); + + return 0; +} diff --git a/lib/librte_eal/windows/meson.build b/lib/librte_eal/windows/meson.build index 8829407c41..adfc8b9b74 100644 --- a/lib/librte_eal/windows/meson.build +++ b/lib/librte_eal/windows/meson.build @@ -7,6 +7,7 @@ sources += files( 'eal.c', 'eal_debug.c', 'eal_lcore.c', + 'eal_log.c', 'eal_thread.c', 'fnmatch.c', 'getopt.c',