DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] init rte global log level
@ 2017-08-08  2:41 ych
  0 siblings, 0 replies; only message in thread
From: ych @ 2017-08-08  2:41 UTC (permalink / raw)
  To: users

Hi,all
Is it a little problematic to do log initialization global level? When RTE_LOG_LEVEL > = RTE_LOG_DEBUG, set global level to RTE_LOG_INFO?
If I customize RTE_LOG_LEVEL = RTE_LOG_DEBUG, can I not set global level to RTE_LOG_DEBUG?

RTE_INIT(rte_log_init);
static void rte_log_init(void)
{
uint32_t i;

#if RTE_LOG_LEVEL >= RTE_LOG_DEBUG
rte_log_set_global_level(RTE_LOG_INFO);
#else
rte_log_set_global_level(RTE_LOG_LEVEL);
#endif

I think it is reasonable to modify it this way:
#if RTE_LOG_LEVEL > RTE_LOG_DEBUG
rte_log_set_global_level(RTE_LOG_INFO);
#else
rte_log_set_global_level(RTE_LOG_LEVEL);
#endif





ych@panath.cn

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-08  2:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08  2:41 [dpdk-users] init rte global log level ych

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).