From: Stephen Hemminger <stephen@networkplumber.org>
To: jerinj@marvell.com, ndabilpuram@marvell.com, vattunuru@marvell.com
Cc: dev@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH] octeontx2: do not put escape sequences in log
Date: Wed, 10 Jul 2019 20:11:54 -0700 [thread overview]
Message-ID: <20190711031154.16029-1-stephen@networkplumber.org> (raw)
Putting color escape sequences in the log look pretty for the
developer but fails in real world DPDK usage. A real application
will put DPDK log to syslog, and syslog does not handle escape
sequences.
Fixes: dd543124cd93 ("common/octeontx2: add runtime log infra")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/octeontx2/otx2_common.h | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/common/octeontx2/otx2_common.h b/drivers/common/octeontx2/otx2_common.h
index cdb25d9ed203..e53d411f065d 100644
--- a/drivers/common/octeontx2/otx2_common.h
+++ b/drivers/common/octeontx2/otx2_common.h
@@ -69,12 +69,9 @@ extern int otx2_logtype_tm;
extern int otx2_logtype_tim;
extern int otx2_logtype_dpi;
-#define OTX2_CLNRM "\x1b[0m"
-#define OTX2_CLRED "\x1b[31m"
-
-#define otx2_err(fmt, args...) \
- RTE_LOG(ERR, PMD, ""OTX2_CLRED"%s():%u " fmt OTX2_CLNRM"\n", \
- __func__, __LINE__, ## args)
+#define otx2_err(fmt, args...) \
+ RTE_LOG(ERR, PMD, "%s():%u " fmt "\n", \
+ __func__, __LINE__, ## args)
#define otx2_info(fmt, args...) \
RTE_LOG(INFO, PMD, fmt"\n", ## args)
--
2.20.1
next reply other threads:[~2019-07-11 3:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 3:11 Stephen Hemminger [this message]
2019-07-11 8:16 [dpdk-dev] [PATCH] octeontx2: do not put escape sequences in log Jerin Jacob Kollanukkaran
2019-07-15 22:12 ` 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=20190711031154.16029-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=vattunuru@marvell.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.