eal/windows: support logging

Initialize logging on Windows to send log output
to the console.

Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
Reviewed-by: Tasnim Bashar <tbashar@mellanox.com>
Tested-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Tested-by: Narcisa Vasile <navasile@linux.microsoft.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
This commit is contained in:
Pallavi Kadam 2020-05-05 18:30:32 -07:00 committed by Thomas Monjalon
parent 98e792a35c
commit 5ebf83784d
3 changed files with 19 additions and 0 deletions

View File

@ -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 */

View File

@ -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;
}

View File

@ -7,6 +7,7 @@ sources += files(
'eal.c',
'eal_debug.c',
'eal_lcore.c',
'eal_log.c',
'eal_thread.c',
'fnmatch.c',
'getopt.c',