From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Hall Subject: Re: [PATCH] librte_log: add function to retrieve log_level Date: Mon, 15 Sep 2014 01:16:37 -0700 Message-ID: <515e4bf4-8e68-4d46-bf05-677e02717768@email.android.com> References: <1410683686-12389-1-git-send-email-mhall@mhcomputing.net> <59AF69C657FD0841A61C55336867B5B0343F15D6@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: "Richardson, Bruce" , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: <59AF69C657FD0841A61C55336867B5B0343F15D6-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Thanks for the ack Bruce! Used this one to clean up a lot of grubby app-s= ide code and I hate forking open source for too long if it can be avoided= . Matthew. --=20 Sent from my mobile device. On September 15, 2014 1:14:57 AM PDT, "Richardson, Bruce" wrote: >> -----Original Message----- >> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Matthew Hall >> Sent: Sunday, September 14, 2014 9:35 AM >> To: dev-VfR2kkLFssw@public.gmane.org >> Subject: [dpdk-dev] [PATCH] librte_log: add function to retrieve >log_level >>=20 >> Signed-off-by: Matthew Hall >Acked-by: Bruce Richardson > >> --- >> lib/librte_eal/common/eal_common_log.c | 7 +++++++ >> lib/librte_eal/common/include/rte_log.h | 6 ++++++ >> 2 files changed, 13 insertions(+) >>=20 >> diff --git a/lib/librte_eal/common/eal_common_log.c >> b/lib/librte_eal/common/eal_common_log.c >> index e4df0b9..d979f28 100644 >> --- a/lib/librte_eal/common/eal_common_log.c >> +++ b/lib/librte_eal/common/eal_common_log.c >> @@ -176,6 +176,13 @@ rte_set_log_level(uint32_t level) >> rte_logs.level =3D (uint32_t)level; >> } >>=20 >> +/* Get global log level */ >> +uint32_t >> +rte_get_log_level() >> +{ >> + return rte_logs.level; >> +} >> + >> /* Set global log type */ >> void >> rte_set_log_type(uint32_t type, int enable) >> diff --git a/lib/librte_eal/common/include/rte_log.h >> b/lib/librte_eal/common/include/rte_log.h >> index 565415a..7f1c2f9 100644 >> --- a/lib/librte_eal/common/include/rte_log.h >> +++ b/lib/librte_eal/common/include/rte_log.h >> @@ -130,6 +130,12 @@ int rte_openlog_stream(FILE *f); >> void rte_set_log_level(uint32_t level); >>=20 >> /** >> + * Get the global log level. >> + * >> + */ >> +uint32_t rte_get_log_level(void); >> + >> +/** >> * Enable or disable the log type. >> * >> * @param type >> -- >> 1.9.1