From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9688420F for ; Tue, 10 Jan 2017 11:49:18 +0100 (CET) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 10 Jan 2017 02:49:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,343,1477983600"; d="scan'208";a="51526773" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by fmsmga005.fm.intel.com with ESMTP; 10 Jan 2017 02:49:16 -0800 To: Thomas Monjalon , Slawomir Mrozowicz References: <1480691702-4600-1-git-send-email-michalx.k.jastrzebski@intel.com> <1483635001-15473-1-git-send-email-slawomirx.mrozowicz@intel.com> <1483635001-15473-2-git-send-email-slawomirx.mrozowicz@intel.com> <2615371.2k6WulVlxV@xps13> Cc: dev@dpdk.org From: Declan Doherty Message-ID: <4f4e8f46-2be6-aef5-e539-5ccd9b2c9097@intel.com> Date: Tue, 10 Jan 2017 10:41:51 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2615371.2k6WulVlxV@xps13> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/3] eal: add quiet mode to suppress log output to stdout X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jan 2017 10:49:19 -0000 On 05/01/17 15:40, Thomas Monjalon wrote: > 2017-01-05 17:49, Slawomir Mrozowicz: >> Add EAL option to suppresses all log output to stdout. >> >> Signed-off-by: Declan Doherty > [...] >> " --"OPT_LOG_LEVEL" Set default log level\n" >> + " -s, --"OPT_LOG_STDOUT_SILENT" Silent mode, suppresses log " >> + "output to stdout\n" > > How does it behave when the app configure a custom log function which > prints to stdout? > > Generally speaking, we should stop adding such options in DPDK and > move this kind of responsibility to the applications (providing some API > and helpers). > Hey Thomas, this option wouldn't affect a custom log function as the flag this controls is only used within by the default Linux log file stream in the console_log_write function. Maybe a better option would be to change the general behaviour of the default logging function and remove the printf to stdout completely and add a generic verbose option applicable to all environments which would allow log output to be directed to stdout. I did notice that the default behaviour between Linux/BSD does seem to be different with Linux defaulting to syslog/stdout and BSD to stderr. One way or another I would like to able to disable streaming of log output to stdout when using the default log stream in Linux, but I'm open to suggestions as to the best way of doing this?