From: Pallavi Kadam <pallavi.kadam@intel.com>
To: dev@dpdk.org, thomas@monjalon.net
Cc: ranjit.menon@intel.com, Harini.Ramakrishnan@microsoft.com,
Narcisa.Vasile@microsoft.com, dmitry.kozliuk@gmail.com,
tbashar@mellanox.com, pallavi.kadam@intel.com
Subject: [dpdk-dev] [PATCH 1/2] eal: initialize eal logging on Windows
Date: Wed, 29 Apr 2020 16:24:26 -0700 [thread overview]
Message-ID: <20200429232427.7112-2-pallavi.kadam@intel.com> (raw)
In-Reply-To: <20200429232427.7112-1-pallavi.kadam@intel.com>
Add logging function 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>
---
lib/librte_eal/windows/eal.c | 3 +++
lib/librte_eal/windows/eal_log.c | 16 ++++++++++++++++
lib/librte_eal/windows/meson.build | 1 +
3 files changed, 20 insertions(+)
create mode 100644 lib/librte_eal/windows/eal_log.c
diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c
index 2cf7a04ef..123afed8d 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -227,6 +227,9 @@ rte_eal_init(int argc, char **argv)
{
int i, fctret;
+ /* initialize all logs */
+ 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 000000000..875981f13
--- /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 09dd4ab2f..e5d1d8336 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',
'getopt.c',
)
--
2.18.0.windows.1
next prev parent reply other threads:[~2020-04-29 23:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 23:24 [dpdk-dev] [PATCH 0/2] Windows logging Pallavi Kadam
2020-04-29 23:24 ` Pallavi Kadam [this message]
2020-04-29 23:24 ` [dpdk-dev] [PATCH 2/2] eal: add fnmatch implementation on Windows Pallavi Kadam
2020-04-30 6:52 ` Thomas Monjalon
2020-04-30 7:30 ` Dmitry Kozlyuk
2020-05-01 1:08 ` Ranjit Menon
2020-05-04 16:51 ` Thomas Monjalon
2020-04-30 6:48 ` [dpdk-dev] [PATCH 0/2] Windows logging Thomas Monjalon
2020-04-30 22:18 ` Kadam, Pallavi
2020-05-06 1:30 ` [dpdk-dev] [PATCH v2 " Pallavi Kadam
2020-05-06 1:30 ` [dpdk-dev] [PATCH v2 1/2] eal: add fnmatch implementation Pallavi Kadam
2020-05-06 2:24 ` Narcisa Ana Maria Vasile
2020-05-06 1:30 ` [dpdk-dev] [PATCH v2 2/2] eal: add log support on Windows Pallavi Kadam
2020-05-06 2:20 ` Narcisa Ana Maria Vasile
2020-05-07 10:17 ` Thomas Monjalon
2020-05-07 10:19 ` [dpdk-dev] [PATCH v2 0/2] Windows logging Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200429232427.7112-2-pallavi.kadam@intel.com \
--to=pallavi.kadam@intel.com \
--cc=Harini.Ramakrishnan@microsoft.com \
--cc=Narcisa.Vasile@microsoft.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=ranjit.menon@intel.com \
--cc=tbashar@mellanox.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).