All of lore.kernel.org
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] octeontx2: do not put escape sequences in log
@ 2019-07-11  3:11 Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2019-07-11  3:11 UTC (permalink / raw)
  To: jerinj, ndabilpuram, vattunuru; +Cc: dev, Stephen Hemminger

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] octeontx2: do not put escape sequences in log
  2019-07-11  8:16 Jerin Jacob Kollanukkaran
@ 2019-07-15 22:12 ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-07-15 22:12 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: dev, Jerin Jacob Kollanukkaran, Nithin Kumar Dabilpuram,
	Vamsi Krishna Attunuru

11/07/2019 10:16, Jerin Jacob Kollanukkaran:
> From: Stephen Hemminger <stephen@networkplumber.org>
> > 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>
> 
> Request to change git commit as "common/octeontx2: remove escape sequences in log" on apply.
> 
> With change:
> Acked-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] octeontx2: do not put escape sequences in log
@ 2019-07-11  8:16 Jerin Jacob Kollanukkaran
  2019-07-15 22:12 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob Kollanukkaran @ 2019-07-11  8:16 UTC (permalink / raw)
  To: Stephen Hemminger, Nithin Kumar Dabilpuram, Vamsi Krishna Attunuru; +Cc: dev

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Thursday, July 11, 2019 8:42 AM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Nithin Kumar
> Dabilpuram <ndabilpuram@marvell.com>; Vamsi Krishna Attunuru
> <vattunuru@marvell.com>
> Cc: dev@dpdk.org; Stephen Hemminger <stephen@networkplumber.org>
> Subject: [EXT] [PATCH] octeontx2: do not put escape sequences in log
> ----------------------------------------------------------------------
> 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>

Request to change git commit as "common/octeontx2: remove escape sequences in log" on apply.

With change:
Acked-by: Jerin Jacob <jerinj@marvell.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-15 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11  3:11 [dpdk-dev] [PATCH] octeontx2: do not put escape sequences in log Stephen Hemminger
2019-07-11  8:16 Jerin Jacob Kollanukkaran
2019-07-15 22:12 ` Thomas Monjalon

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.