From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 825635A50 for ; Fri, 5 Jun 2015 15:59:21 +0200 (CEST) Received: by wibdq8 with SMTP id dq8so20056575wib.1 for ; Fri, 05 Jun 2015 06:59:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=hLUcacoOjG0KzZBF6mm5ljrPWqw3wNmH/un8m14tVIY=; b=KBv4b4RMdoeIog3IqYHx2GAfczw8vIvzNH7QvX5rv67vzo8sdt4JCP4fItEFKQwXJw o+hdG5FoUx8mGGDN3c0bmZC4ETDTP8kVL9EJYED1kN1ZlWL/Ewr5OBpa2x5/DHwV9ZzC Ns7p+ex+2X9Lje3w+nCezhA5fFLgZE/LMfjf8pb+hzVGZ8qme3pI0PXeBcwDBmWOLMEB bV5k/pi9RTDxam0SwqFXnfNU5naa8Qyzgxl/IkVte00PyOeAZUVW8fAENlQXPsI3Rx/i Xz9tOcOQJmizCTCkUjMVAVLH4qbz+ebnp53VCAWjkQJqQHvnJDebJoMiUAvO5qmtpgxG /PKQ== X-Gm-Message-State: ALoCoQl0djzQYhkIuXA6Pp7Hy56blRHwESLWYcywAztnXbLcmwfxBJTLPNBLB4gdLhCMhkvE6EIB X-Received: by 10.194.189.228 with SMTP id gl4mr6847945wjc.1.1433512761337; Fri, 05 Jun 2015 06:59:21 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id q9sm2461560wix.1.2015.06.05.06.59.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 06:59:20 -0700 (PDT) From: Thomas Monjalon To: "Wiles, Keith" Date: Fri, 05 Jun 2015 15:58:28 +0200 Message-ID: <2833576.frKFEzTGXa@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: References: <4143606.5Er6ccdYXp@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] The use of --log-level and its default state 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: Fri, 05 Jun 2015 13:59:21 -0000 Keith, your mail is very long but it's maybe on purpose to show that there are too many logs ;) 2015-06-05 12:32, Wiles, Keith: > On 6/5/15, 5:00 AM, "Thomas Monjalon" wro= te: > >2015-05-27 15:10, Wiles, Keith: > >> I would like to have the log-level default changed to not log > >>everything, > >> but the user needs to enable the log messages if he needs to see m= ore > >> information. Normally applications or systems are not so verbose, = but if > >> needed the user enables the verbose or debug messages. > >>=20 > >> Can we change the default logs and messages to be non-verbose inst= ead? > > > >Do you mean changing this line? > > /* default value from build option */ > > internal_cfg->log_level =3D RTE_LOG_LEVEL; > >It means using the most verbose level available in the build. > > > >Maybe we should set RTE_LOG_NOTICE or RTE_LOG_WARNING, > >However, there is already --log-level for the user and rte_set_log_l= evel() > >for the application developper. > >So this default log level is only used for DPDK trials and developme= nt. > >Probably that being verbose is a good option for such cases? > > > The normal operation for most systems is no-news-is-good-news, meanin= g > only report warnings and errors if someone wants informational output= it > should be enabled by the user. It seems PMDs and other parts of DPDK = print > out information which is not a warning or error, but are debug or > informational messages that are not very useful. The debug informatio= n is > more for the developer then a user or even a developer of DPDK as the= > debug information has nothing to do with the current developers goals= . This assumption is not fully true. In normal applications DPDK doesn't show so many logs. But in testpmd or examples, the log level is not set (by default) and t= hey behave as debug applications, which is probably a good default. However, as you say below, the log level of some messages is not well t= uned. > We can change the RTE_LOG_LEVEL to a value that only prints warning a= nd > errors should always be printed. We can leave it or we can make that = one > change to reduce the amount of clutter on the screen. Some of the PMD= > information is printed out anytime the state changes, which effects t= he > application screen output. >=20 > When I have to interact with users of DPDK they sometimes miss critic= al > details in the output because of the sheer amount of output on the sc= reen. > Even most OSes try to output information to the screen is a sane way = to > allow someone to quickly spot a problem. >=20 > Here is a normal output with log level at the default: >=20 [...]=20 > When I quit the application I get the four above are they really usef= ul, > not really IMO. The PMD information and the EAL information is not ve= ry > use 99% of the time. Yes it is a debug mode. > Next is =E2=80=B9log-level=3D0 on the command line. >=20 > EAL: Detected lcore 0 as core 0 on socket 0 > EAL: Detected lcore 1 as core 1 on socket 0 > EAL: Detected lcore 2 as core 2 on socket 0 > EAL: Detected lcore 3 as core 3 on socket 0 > EAL: Detected lcore 4 as core 4 on socket 0 > EAL: Detected lcore 5 as core 8 on socket 0 > EAL: Detected lcore 6 as core 9 on socket 0 > EAL: Detected lcore 7 as core 10 on socket 0 > EAL: Detected lcore 8 as core 11 on socket 0 > EAL: Detected lcore 9 as core 16 on socket 0 > EAL: Detected lcore 10 as core 17 on socket 0 > EAL: Detected lcore 11 as core 18 on socket 0 > EAL: Detected lcore 12 as core 19 on socket 0 > EAL: Detected lcore 13 as core 20 on socket 0 > EAL: Detected lcore 14 as core 24 on socket 0 > EAL: Detected lcore 15 as core 25 on socket 0 > EAL: Detected lcore 16 as core 26 on socket 0 > EAL: Detected lcore 17 as core 27 on socket 0 > EAL: Detected lcore 18 as core 0 on socket 1 > EAL: Detected lcore 19 as core 1 on socket 1 > EAL: Detected lcore 20 as core 2 on socket 1 > EAL: Detected lcore 21 as core 3 on socket 1 > EAL: Detected lcore 22 as core 4 on socket 1 > EAL: Detected lcore 23 as core 8 on socket 1 > EAL: Detected lcore 24 as core 9 on socket 1 > EAL: Detected lcore 25 as core 10 on socket 1 > EAL: Detected lcore 26 as core 11 on socket 1 > EAL: Detected lcore 27 as core 16 on socket 1 > EAL: Detected lcore 28 as core 17 on socket 1 > EAL: Detected lcore 29 as core 18 on socket 1 > EAL: Detected lcore 30 as core 19 on socket 1 > EAL: Detected lcore 31 as core 20 on socket 1 > EAL: Detected lcore 32 as core 24 on socket 1 > EAL: Detected lcore 33 as core 25 on socket 1 > EAL: Detected lcore 34 as core 26 on socket 1 > EAL: Detected lcore 35 as core 27 on socket 1 > EAL: Detected lcore 36 as core 0 on socket 0 > EAL: Detected lcore 37 as core 1 on socket 0 > EAL: Detected lcore 38 as core 2 on socket 0 > EAL: Detected lcore 39 as core 3 on socket 0 > EAL: Detected lcore 40 as core 4 on socket 0 > EAL: Detected lcore 41 as core 8 on socket 0 > EAL: Detected lcore 42 as core 9 on socket 0 > EAL: Detected lcore 43 as core 10 on socket 0 > EAL: Detected lcore 44 as core 11 on socket 0 > EAL: Detected lcore 45 as core 16 on socket 0 > EAL: Detected lcore 46 as core 17 on socket 0 > EAL: Detected lcore 47 as core 18 on socket 0 > EAL: Detected lcore 48 as core 19 on socket 0 > EAL: Detected lcore 49 as core 20 on socket 0 > EAL: Detected lcore 50 as core 24 on socket 0 > EAL: Detected lcore 51 as core 25 on socket 0 > EAL: Detected lcore 52 as core 26 on socket 0 > EAL: Detected lcore 53 as core 27 on socket 0 > EAL: Detected lcore 54 as core 0 on socket 1 > EAL: Detected lcore 55 as core 1 on socket 1 > EAL: Detected lcore 56 as core 2 on socket 1 > EAL: Detected lcore 57 as core 3 on socket 1 > EAL: Detected lcore 58 as core 4 on socket 1 > EAL: Detected lcore 59 as core 8 on socket 1 > EAL: Detected lcore 60 as core 9 on socket 1 > EAL: Detected lcore 61 as core 10 on socket 1 > EAL: Detected lcore 62 as core 11 on socket 1 > EAL: Detected lcore 63 as core 16 on socket 1 > EAL: Detected lcore 64 as core 17 on socket 1 > EAL: Detected lcore 65 as core 18 on socket 1 > EAL: Detected lcore 66 as core 19 on socket 1 > EAL: Detected lcore 67 as core 20 on socket 1 > EAL: Detected lcore 68 as core 24 on socket 1 > EAL: Detected lcore 69 as core 25 on socket 1 > EAL: Detected lcore 70 as core 26 on socket 1 > EAL: Detected lcore 71 as core 27 on socket 1 > EAL: Support maximum 128 logical core(s) by configuration. > EAL: Detected 72 lcore(s) > EAL: Auto-detected process type: PRIMARY >=20 >=20 > I suggest only the last three line are even remotely useful and we do= not > even print out the DPDK version number. I would put these as informat= ion > data and the EAL: does not need to be present and you can not turn th= at > information off. Yes, please fix the log level of the early messages. Why do you want to remove the EAL prefix? > Example output: (Email my wrap the lines below) >=20 > *** DPDK version 2.1.0 Copyright(c) 2010-2015 Intel Corporation. All > rights reserved. *** > Detected 72 lcore(s) with supporting maximum 128 logical core(s) by= > configuration > Auto-detected process type: PRIMARY >=20 > Maybe print out the amount of memory configured and ports detected or= > devices. These are info messages. > One of the license statements it to output the copyright notice for b= inary > distributions and it would be nice to just output them anyway even in= > source code form as they would need to do it anyway. We may need to a= dd a > couple more copyright notices as well here. Not sure that licences and copyrights should be printed. > Anyway let me know what you want to do here and I can try to produce = a > patch. You may start by trying to remove early debug logs when level is higher= . Thanks