From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7BA192E81 for ; Mon, 15 Sep 2014 10:09:31 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 15 Sep 2014 01:15:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="386140086" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by FMSMGA003.fm.intel.com with ESMTP; 15 Sep 2014 01:09:38 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX103.ger.corp.intel.com (163.33.3.157) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 15 Sep 2014 09:14:58 +0100 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.112]) by IRSMSX155.ger.corp.intel.com ([169.254.14.85]) with mapi id 14.03.0195.001; Mon, 15 Sep 2014 09:14:58 +0100 From: "Richardson, Bruce" To: Matthew Hall , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] librte_log: add function to retrieve log_level Thread-Index: AQHPz/bYFLbQpI9mL0OFr1ca9ijjPJwB2jcg Date: Mon, 15 Sep 2014 08:14:57 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B0343F15D6@IRSMSX103.ger.corp.intel.com> References: <1410683686-12389-1-git-send-email-mhall@mhcomputing.net> In-Reply-To: <1410683686-12389-1-git-send-email-mhall@mhcomputing.net> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] librte_log: add function to retrieve log_level X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2014 08:09:32 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Matthew Hall > Sent: Sunday, September 14, 2014 9:35 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] librte_log: add function to retrieve log_leve= l >=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