* [dpdk-dev] Question about log levels and rte_panic
@ 2016-02-13 17:43 Wiles, Keith
2016-02-13 19:12 ` Matthew Hall
2016-02-14 20:23 ` Stephen Hemminger
0 siblings, 2 replies; 3+ messages in thread
From: Wiles, Keith @ 2016-02-13 17:43 UTC (permalink / raw)
To: dev
I have some code I have been debugging that does a rte_panic() at some point. The problem is it just appeared to exit without printing the panic message. I tracked it down to rte_vlog() doing the following test.
if ((level > rte_logs.level) || !(logtype & rte_logs.type))
return 0;
The reason it appears to just exit to the shell is I was setting —log-level 0 on the command line, which means no CRIT, EMERG or ALERTs panic messages are printed. If I set the log-level 3 then I am able to see these ‘critical’ panic messages, is this the expected behavior?
I would expect EMERG, ALERT and CRIT messages to be printed regardless of the log-level value, but I guess it just means log-level 3 is the lowest level unless you really do not want these messages printed.
Regards,
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] Question about log levels and rte_panic
2016-02-13 17:43 [dpdk-dev] Question about log levels and rte_panic Wiles, Keith
@ 2016-02-13 19:12 ` Matthew Hall
2016-02-14 20:23 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Hall @ 2016-02-13 19:12 UTC (permalink / raw)
To: Wiles, Keith; +Cc: dev
> On Feb 13, 2016, at 9:43 AM, Wiles, Keith <keith.wiles@intel.com> wrote:
>
> I would expect EMERG, ALERT and CRIT messages to be printed regardless of the log-level value
I wouldn't expect that based on the traditional custom of syslog daemons. If you specify a filter configuration, such as setlogmask or some custom logic in the syslog daemon itself, the logging system should respect it. Even if it might not make sense to a given individual.
That said, rte_panic should be making sure the messages it generates always get logged, regardless of the logging system settings, because it is hijacking control of your process which is a very hostile act. This special exemption should only happen for things that are truly fatal. Not anything else.
Matthew.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] Question about log levels and rte_panic
2016-02-13 17:43 [dpdk-dev] Question about log levels and rte_panic Wiles, Keith
2016-02-13 19:12 ` Matthew Hall
@ 2016-02-14 20:23 ` Stephen Hemminger
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2016-02-14 20:23 UTC (permalink / raw)
To: Wiles, Keith; +Cc: dev
On Sat, 13 Feb 2016 17:43:38 +0000
"Wiles, Keith" <keith.wiles@intel.com> wrote:
> The reason it appears to just exit to the shell is I was setting —log-level 0 on the command line, which means no CRIT, EMERG or ALERTs panic messages are printed. If I set the log-level 3 then I am able to see these ‘critical’ panic messages, is this the expected behavior?
You got what you asked for. I don't see a problem with that...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-14 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-13 17:43 [dpdk-dev] Question about log levels and rte_panic Wiles, Keith
2016-02-13 19:12 ` Matthew Hall
2016-02-14 20:23 ` Stephen Hemminger
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).