Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C14F910B13 for ; Mon, 23 Feb 2015 17:03:20 +0000 (UTC) Received: (qmail 92751 invoked by uid 500); 23 Feb 2015 17:03:20 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 92706 invoked by uid 500); 23 Feb 2015 17:03:20 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 92695 invoked by uid 99); 23 Feb 2015 17:03:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2015 17:03:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.212.182] (HELO mail-wi0-f182.google.com) (209.85.212.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2015 17:03:14 +0000 Received: by mail-wi0-f182.google.com with SMTP id l15so19045441wiw.3 for ; Mon, 23 Feb 2015 09:01:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=UWEMr6eAfI3Fai+ZTQsofmAH7Nig5CRi1rQTuqEK9i8=; b=kfRq+Npxb+mMVBXl1KNS8k7dsDrA8ZkiBnvMnlLYjGLCWvKlKj4PyJtQjE0tItplVt ifghkRCW8R+FWYkMiH5JLmr/YhX9tLhvVaQDI0s7hV9Hdj0K8o2hGRtocf5EsDFLyLMN wt31Kjo9caVNX8JSUFKvUecn/mrRkBkuIYM0rvL1x713CfKMQzLos7VziQMzb5QjZKiS ILFplzGdkSduxf/50jvzctj+dsCDl8u8nAmAyLY/7y6PMY8OOJyi1vxadfYGA6GOsFZq 8kjVi91TnTmeLbWVvm62zQOOW1Wd6abx9mC3KJC46mJGckuqkgJ7wXGhooZcbIXxeRem ughg== X-Gm-Message-State: ALoCoQl1i26i1yl+E8URXD6VFJsv7irlq2F1C4sI4dgE6f6llDa7Gxw8tf0VawtcY8r8GAXwwsD4 MIME-Version: 1.0 X-Received: by 10.180.208.20 with SMTP id ma20mr22168683wic.22.1424710906538; Mon, 23 Feb 2015 09:01:46 -0800 (PST) Received: by 10.180.41.239 with HTTP; Mon, 23 Feb 2015 09:01:46 -0800 (PST) Date: Mon, 23 Feb 2015 12:01:46 -0500 Message-ID: Subject: turning off per class logging From: Ben Hsu To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=001a11c385967e064c050fc45b30 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c385967e064c050fc45b30 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello I wish to suppress zookeeper logging at the class level. I see a lot of messages in my log along these lines: 2015-02-23 16:54:53,192 - INFO [NIOServerCxn.Factory:/0.0.0.0:2181 :NIOServerCnxnFactory@197] - Accepted socket connection from / 127.0.0.1:37142 2015-02-23 16:54:53,202 - INFO [NIOServerCxn.Factory:/0.0.0.0:2181 :NIOServerCnxn@827] - Processing srvr command from /127.0.0.1:37142 2015-02-23 16:54:53,205 - INFO [Thread-3:NIOServerCnxn@1007] - Closed socket connection for client /127.0.0.1:37142 (no session established for client) 2015-02-23 16:54:53,234 - INFO [NIOServerCxn.Factory:/0.0.0.0:2181 :NIOServerCnxnFactory@197] - Accepted socket connection from / 127.0.0.1:37143 2015-02-23 16:54:53,235 - INFO [NIOServerCxn.Factory:/0.0.0.0:2181 :NIOServerCnxn@827] - Processing wchs command from /127.0.0.1:37143 2015-02-23 16:54:53,237 - INFO [Thread-4:NIOServerCnxn@1007] - Closed socket connection for client /127.0.0.1:37143 (no session established for client) I want to set logging for the NIOServerCnxn and NIOServerCnxnFactory classes to WARN, but keep everything else at the INFO level. How can I do this? I tried to set log4j properties at the class level: java -Dlog4j.logger.org.apache.zookeeper.server.NIOServerxnFactory=3DWARN -Dlog4j.logger.org.apache.zookeeper.server.NIOServerCnxn=3DWARN -Dzookeeper.log.dir=3D/var/log/ -Dzookeeper.root.logger=3DCONSOLE -cp /etc/zookeeper::/usr/lib64/zookeeper/bin/../zookeeper-3.4.6.jar:/usr/lib64/= zookeeper/bin/../lib/jline-0.9.94.jar:/usr/lib64/zookeeper/bin/../lib/log4j= -1.2.16.jar:/usr/lib64/zookeeper/bin/../lib/netty-3.7.0.Final.jar:/usr/lib6= 4/zookeeper/bin/../lib/slf4j-api-1.6.1.jar:/usr/lib64/zookeeper/bin/../lib/= slf4j-log4j12-1.6.1.jar -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=3Dfalse org.apache.zookeeper.server.quorum.QuorumPeerMain /etc/zookeeper/zoo.cfg This didn't work: log messages for those two classes are still coming out. I tried with the lower case ("warn" instead of "WARN") and that didn't work either Further playing around with setting zookeeper.root.logger to ERROR makes me wonder if zookeeper is honoring these command line parameters at all I don't see any reference to a log4j.properties, and running it under strace tells me its not opening a log4j file anywhere. any ideas? --001a11c385967e064c050fc45b30--