From patchwork Thu Mar 5 12:13:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Haslam X-Patchwork-Id: 45455 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0CA33204BC for ; Thu, 5 Mar 2015 12:14:04 +0000 (UTC) Received: by wggx13 with SMTP id x13sf4283298wgg.0 for ; Thu, 05 Mar 2015 04:14:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=IZrQZuMrN09CSh1lraxlNlx7j5Lyqk78l5QTDAuJi78=; b=W0+dGWihIkmyOKHzN1DZi+s7Uy/FWVoj6QmV/6uh67bCn4fWPF2bcqTCtMePs3UCDw snLGtw+/yyuF6T/TTi6fQDF5dX8g8dqXbl9FxUcqTjlp+Oh14d9ZX4KYoP/COl/hiH6t rwtn7vw4ZqIipBiXFKdVbyYOpxhDTvheBlyn0NRvlk907sUAOMw/rHhnS/y7S//IkqaS lR3oNx9jjV5dufO/1FdCFI294VZ7HrpTczXj//R6XdVlNiTcDT98YM6SqDe9Qh1lMhMY 5+zcWFoanPd0EiG/8msNPpGOj1i3JG8k0PquDAdluVCRc8TEfTtba4CNQ7u+CTil+Sbx NxWQ== X-Gm-Message-State: ALoCoQn5Y40kJur3xbcYjZAv3sJfqAzmko0lEUKn1OWpMGmqYbeXOM2fJ3UZcjM66jA9q2XZcEMs X-Received: by 10.194.239.41 with SMTP id vp9mr1461331wjc.5.1425557643344; Thu, 05 Mar 2015 04:14:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.68 with SMTP id y4ls321927lay.12.gmail; Thu, 05 Mar 2015 04:14:03 -0800 (PST) X-Received: by 10.152.204.6 with SMTP id ku6mr7690389lac.62.1425557643048; Thu, 05 Mar 2015 04:14:03 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id py2si2761649lbb.33.2015.03.05.04.14.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 04:14:03 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by labgd6 with SMTP id gd6so3916444lab.6 for ; Thu, 05 Mar 2015 04:14:02 -0800 (PST) X-Received: by 10.152.178.197 with SMTP id da5mr7807028lac.56.1425557642791; Thu, 05 Mar 2015 04:14:02 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp443400lbj; Thu, 5 Mar 2015 04:14:02 -0800 (PST) X-Received: by 10.140.32.52 with SMTP id g49mr11543386qgg.83.1425557640854; Thu, 05 Mar 2015 04:14:00 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 43si5833221qga.22.2015.03.05.04.13.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 05 Mar 2015 04:14:00 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTUf6-0002jK-WF; Thu, 05 Mar 2015 12:13:57 +0000 Received: from mail-wg0-f54.google.com ([74.125.82.54]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YTUf1-0002jF-Eb for lng-odp@lists.linaro.org; Thu, 05 Mar 2015 12:13:51 +0000 Received: by wghk14 with SMTP id k14so9156639wgh.7 for ; Thu, 05 Mar 2015 04:13:46 -0800 (PST) X-Received: by 10.194.201.164 with SMTP id kb4mr17978898wjc.32.1425557626037; Thu, 05 Mar 2015 04:13:46 -0800 (PST) Received: from e106441.cambridge.arm.com ([2001:41d0:a:3cb4::1]) by mx.google.com with ESMTPSA id uo6sm10239620wjc.49.2015.03.05.04.13.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Mar 2015 04:13:45 -0800 (PST) From: Stuart Haslam To: lng-odp@lists.linaro.org Date: Thu, 5 Mar 2015 12:13:38 +0000 Message-Id: <1425557618-14771-1-git-send-email-stuart.haslam@linaro.org> X-Mailer: git-send-email 2.1.1 X-Topics: patch Subject: [lng-odp] [PATCH] linux-generic: only print errors to stderr X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stuart.haslam@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The default logger prints all log levels to stderr. To make things easier when debugging failures change it to print only errors to stderr and everything else to stdout. Signed-off-by: Stuart Haslam --- platform/linux-generic/odp_weak.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_weak.c b/platform/linux-generic/odp_weak.c index 7fa5955..0a90ee6 100644 --- a/platform/linux-generic/odp_weak.c +++ b/platform/linux-generic/odp_weak.c @@ -14,9 +14,20 @@ int odp_override_log(odp_log_level_e level ODP_UNUSED, const char *fmt, ...) { va_list args; int r; + FILE *logfd; + + switch (level) { + case ODP_LOG_ERR: + case ODP_LOG_UNIMPLEMENTED: + case ODP_LOG_ABORT: + logfd = stderr; + break; + default: + logfd = stdout; + } va_start(args, fmt); - r = vfprintf(stderr, fmt, args); + r = vfprintf(logfd, fmt, args); va_end(args); return r;