Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EF1AD200BEB for ; Wed, 28 Dec 2016 22:18:40 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id EDCAC160B2E; Wed, 28 Dec 2016 21:18:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 439C2160B2A for ; Wed, 28 Dec 2016 22:18:40 +0100 (CET) Received: (qmail 34318 invoked by uid 500); 28 Dec 2016 21:18:34 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 34306 invoked by uid 99); 28 Dec 2016 21:18:34 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Dec 2016 21:18:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 652D81A0071 for ; Wed, 28 Dec 2016 21:18:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.093 X-Spam-Level: * X-Spam-Status: No, score=1.093 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=pronoia-solutions-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id p4tdgSYU9DHu for ; Wed, 28 Dec 2016 21:18:31 +0000 (UTC) Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 4C8E25FC37 for ; Wed, 28 Dec 2016 21:18:30 +0000 (UTC) Received: by mail-it0-f43.google.com with SMTP id x2so198685210itf.1 for ; Wed, 28 Dec 2016 13:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pronoia-solutions-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=AZP7KQj++TCi+RDvTFw6NWP7Fegm86rWdYLam2jfBcA=; b=Yq9YSW7P5Jx6M/0hyL2GjkmPUDzHe/tph9malpy2rCcm4L3m48GkZjMlziEtJQDoZS GqXdndaftclLsQQPldKFPuG+FJ2FTLWbgpoBQB8wX8rcRiocng9N3dkK7Oe2akywaAdi Hf6/G0dPGWxRXIItrX6a9k9WK83VuuwCdx95wHb2+CPYoIheuqcc+x8XTZHI3eT2PQKj 2R0gV6WINLrCIqkUezzvAOK4ZL4bD74+h7sqqiEP21NR2TDL8C8Gu3Mv2UhSxah24D63 NGHuMcIA8ofKn85oe76EEXCEHQsImvCd5JOJTaAxJGwR8+4c80+5aNY7g2bIpD0Y5STb JZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=AZP7KQj++TCi+RDvTFw6NWP7Fegm86rWdYLam2jfBcA=; b=lSeR0AlZHGipf3wpcqYFBGL5xY+WHlo2G8e3CdhAjHxDLiLZzsgjwQq01ql7tYrPj/ Cx7No90vh88AfyF85h7JKZYfxciywMEsXdDUgzlrC/CwrcLtn0EBkZ6eQFb+UqjL+nBU xKRDorOMz8nA98K25QWsMyF/adDEAj3yxkuIYKND2EOmy5q3MZ3KNA6VU/qgKR+0f3fz KpOnLX7s9dhZZ7fUMPb+FaLDvbmwujJL5PwAiNrBd3rjpakrbA+UXuOwZSF23Yq6OZvu 8JM1Y2libx0mk2IKoRcyTrSEJx/2FlKCnk+0pbd6ZG8XqRHVpXx4tYqBOcrQlCUylGyp RYLQ== X-Gm-Message-State: AIkVDXIVgjGan5g0XUJwMkEZMeEt5Lr5RVjbVG+HSiV73bz5TAIWOmkV3B0MJUOLaSKBAw== X-Received: by 10.36.211.133 with SMTP id n127mr29855473itg.29.1482959900965; Wed, 28 Dec 2016 13:18:20 -0800 (PST) Received: from macpro.pronoia.local (c-73-20-8-23.hsd1.ut.comcast.net. [73.20.8.23]) by smtp.gmail.com with ESMTPSA id n3sm22765953itb.2.2016.12.28.13.18.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Dec 2016 13:18:20 -0800 (PST) From: Quinn Stevenson Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: Debug exec of python script Date: Wed, 28 Dec 2016 14:18:19 -0700 References: <1482959586055-5791982.post@n5.nabble.com> To: users@camel.apache.org In-Reply-To: <1482959586055-5791982.post@n5.nabble.com> Message-Id: <7CC8C0F0-F18D-4C0C-BFD2-D482DF87A02B@pronoia-solutions.com> X-Mailer: Apple Mail (2.3259) archived-at: Wed, 28 Dec 2016 21:18:41 -0000 Did you try logging the headers? .log( =E2=80=9CStderr: ${header[CamelExecStderr]} ) or .log( =E2=80=9CExit Value: ${header[CamelExecExitValue]} ) Quinn Stevenson quinn@pronoia-solutions.com (801) 244-7758 > On Dec 28, 2016, at 2:13 PM, jgewehr wrote: >=20 > I'm trying to figure out why my exec of a python script is failing. = My route > looks like this: >=20 > from.("sftp....") > .to("file...") > .to("exec:test.py") > .to("log:foo?showAll"); >=20 > So I'm transferring a file from an SFTP server to the local = filesystem, and > then I want to run a python script on it. The file transfer is = working > fine. However, my python script is returning an error. When I look = in the > log I see CamelExecStderr=3Djava.io.ByteArrayInputStream@5944a314. = According > to the Exec component page here http://camel.apache.org/exec.html: =20 >=20 > ExecBinding.EXEC_STDERR java.io.InputStream The value of this header = points > to the standard error stream (stderr) of the executable. >=20 > I just want to print the actual string value of stderr, not > java.io.ByteArrayInputStream@5944a314. I feel like this should be = easy and > I'm missing something. How do I print the value of the headers on the = Exec > component page, for example ExecBinding.EXEC_STDERR or > ExecBinding.EXEC_EXIT_VALUE? >=20 > Help? >=20 >=20 >=20 > -- > View this message in context: = http://camel.465427.n5.nabble.com/Debug-exec-of-python-script-tp5791982.ht= ml > Sent from the Camel - Users mailing list archive at Nabble.com.