Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B12D185A2 for ; Tue, 10 Nov 2015 12:52:59 +0000 (UTC) Received: (qmail 26664 invoked by uid 500); 10 Nov 2015 12:52:59 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 26591 invoked by uid 500); 10 Nov 2015 12:52:59 -0000 Mailing-List: contact commits-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 commits@ignite.apache.org Received: (qmail 25565 invoked by uid 99); 10 Nov 2015 12:52:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Nov 2015 12:52:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 49AE0E2F31; Tue, 10 Nov 2015 12:52:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Tue, 10 Nov 2015 12:53:32 -0000 Message-Id: <7156cc7ee65c4f4da68aa5e833bc85aa@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [36/50] [abbrv] ignite git commit: IGNITE-1807 Visor cmd write logs to file in quite mode. - Fixes #192. IGNITE-1807 Visor cmd write logs to file in quite mode. - Fixes #192. Signed-off-by: Andrey Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/73932274 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/73932274 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/73932274 Branch: refs/heads/ignite-1758-debug Commit: 7393227477d2dfeb7ce4925fee9945ed6bb80127 Parents: 354358c Author: Andrey Authored: Mon Nov 9 10:52:31 2015 +0700 Committer: Andrey Committed: Mon Nov 9 10:52:31 2015 +0700 ---------------------------------------------------------------------- .../ignite/visor/commands/open/VisorOpenCommand.scala | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/73932274/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala ---------------------------------------------------------------------- diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala index 7d2ee3c..1cfbde4 100644 --- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala +++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/open/VisorOpenCommand.scala @@ -19,6 +19,8 @@ package org.apache.ignite.visor.commands.open +import java.util.logging.{ConsoleHandler, Logger} + import org.apache.ignite.IgniteSystemProperties._ import org.apache.ignite.configuration.IgniteConfiguration import org.apache.ignite.internal.IgniteComponentType._ @@ -26,7 +28,6 @@ import org.apache.ignite.internal.IgniteEx import org.apache.ignite.internal.util.scala.impl import org.apache.ignite.internal.util.spring.IgniteSpringHelper import org.apache.ignite.internal.util.{IgniteUtils => U} -import org.apache.ignite.logger.NullLogger import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi import org.apache.ignite.visor.commands.common.{VisorConsoleCommand, VisorTextTable} import org.apache.ignite.visor.visor._ @@ -158,6 +159,13 @@ class VisorOpenCommand extends VisorConsoleCommand { val cfg = cfgs.iterator().next() + if (log4jTup != null) + System.setProperty(IgniteSystemProperties.IGNITE_CONSOLE_APPENDER, "false") + else + Logger.getGlobal.getHandlers.foreach({ + case handler: ConsoleHandler => Logger.getGlobal.removeHandler(handler) + }) + // Setting up 'Config URL' for properly print in console. System.setProperty(IgniteSystemProperties.IGNITE_CONFIG_URL, url.getPath) @@ -236,10 +244,6 @@ class VisorOpenCommand extends VisorConsoleCommand { // Make sure visor starts without shutdown hook. System.setProperty(IGNITE_NO_SHUTDOWN_HOOK, "true") - // Set NullLoger in quite mode. - if ("true".equalsIgnoreCase(sys.props.getOrElse(IGNITE_QUIET, "true"))) - cfg.setGridLogger(new NullLogger) - ignite = try { // We need to stop previous daemon node before to start new one. prevIgnite.foreach(g => Ignition.stop(g.name(), true))