From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: Re: [PATCH v2 1/3] eal: add quiet mode to suppress log output to stdout Date: Tue, 10 Jan 2017 10:41:51 +0000 Message-ID: <4f4e8f46-2be6-aef5-e539-5ccd9b2c9097@intel.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon , Slawomir Mrozowicz 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) In-Reply-To: <2615371.2k6WulVlxV@xps13> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?