Return-Path: X-Original-To: apmail-ignite-dev-archive@minotaur.apache.org Delivered-To: apmail-ignite-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 187B218BC3 for ; Mon, 14 Dec 2015 12:01:40 +0000 (UTC) Received: (qmail 75452 invoked by uid 500); 14 Dec 2015 12:01:40 -0000 Delivered-To: apmail-ignite-dev-archive@ignite.apache.org Received: (qmail 75402 invoked by uid 500); 14 Dec 2015 12:01:40 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 75391 invoked by uid 99); 14 Dec 2015 12:01:39 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2015 12:01:39 +0000 Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 7A20C1A0052 for ; Mon, 14 Dec 2015 12:01:39 +0000 (UTC) Received: by lfcy184 with SMTP id y184so44925846lfc.1 for ; Mon, 14 Dec 2015 04:01:37 -0800 (PST) X-Gm-Message-State: ALoCoQnGfu/hruJyIFO+sn+juJLPcs+GND8Nxyu/c42RR44g5IwSVX4hLlND6ZZcF9mpANRxs4ofHH8wR8OklhW3bw/p5oewgBQ75IXE0R3gMplWHktSurM= MIME-Version: 1.0 X-Received: by 10.25.153.144 with SMTP id b138mr10702907lfe.167.1450094496989; Mon, 14 Dec 2015 04:01:36 -0800 (PST) Received: by 10.114.183.77 with HTTP; Mon, 14 Dec 2015 04:01:36 -0800 (PST) Date: Mon, 14 Dec 2015 15:01:36 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Debug Output in Prod From: Yakov Zhdanov To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a11401aec6261ee0526da6f28 --001a11401aec6261ee0526da6f28 Content-Type: text/plain; charset=UTF-8 Guys, I noticed the following code in repo several days ago(org/apache/ignite/internal/portable/BinaryWriterExImpl.java:1810): out.unsafeEnsure(1 + 4); out.unsafeWriteByte(GridPortableMarshaller.HANDLE); out.unsafeWriteInt(pos - old); if (obj.getClass().isArray()) System.out.println("CASE!"); return true; Couple of points here: 1. When putting debug output to production code use U.debug(). This method gives at least deprecation warning which can be caught and debug printouts will not get to the repo + it prints timestamp and thread name. 2. Can we change release build to fail if U.debug() is somewhere in production code? Anton V, perhaps you know how to achieve that? --Yakov --001a11401aec6261ee0526da6f28--