IGNITE-7298 Web Agent: Fixed embedded node logger.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f3f2f82f Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f3f2f82f Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f3f2f82f Branch: refs/heads/ignite-8446 Commit: f3f2f82fc79c24fb796d8860358b38928a48b287 Parents: 1caebb8 Author: Andrey Novikov <anovi...@gridgain.com> Authored: Mon Jul 2 09:55:44 2018 +0700 Committer: Andrey Novikov <anovi...@gridgain.com> Committed: Mon Jul 2 09:55:44 2018 +0700 ---------------------------------------------------------------------- .../web-agent/assembly/release-web-agent.xml | 7 -- .../web-agent/bin/ignite-web-agent.bat | 2 +- .../web-agent/bin/ignite-web-agent.sh | 2 +- .../config/java.util.logging.properties | 74 -------------------- .../ignite/console/demo/AgentClusterDemo.java | 5 +- 5 files changed, 5 insertions(+), 85 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/f3f2f82f/modules/web-console/web-agent/assembly/release-web-agent.xml ---------------------------------------------------------------------- diff --git a/modules/web-console/web-agent/assembly/release-web-agent.xml b/modules/web-console/web-agent/assembly/release-web-agent.xml index f4a4939..bb994c0 100644 --- a/modules/web-console/web-agent/assembly/release-web-agent.xml +++ b/modules/web-console/web-agent/assembly/release-web-agent.xml @@ -41,13 +41,6 @@ </includes> </fileSet> <fileSet> - <directory>${basedir}/config</directory> - <outputDirectory>/</outputDirectory> - <includes> - <include>java.util.logging.properties</include> - </includes> - </fileSet> - <fileSet> <directory>${basedir}/bin</directory> <outputDirectory>/</outputDirectory> <includes> http://git-wip-us.apache.org/repos/asf/ignite/blob/f3f2f82f/modules/web-console/web-agent/bin/ignite-web-agent.bat ---------------------------------------------------------------------- diff --git a/modules/web-console/web-agent/bin/ignite-web-agent.bat b/modules/web-console/web-agent/bin/ignite-web-agent.bat index 5fb16c8..387447f 100644 --- a/modules/web-console/web-agent/bin/ignite-web-agent.bat +++ b/modules/web-console/web-agent/bin/ignite-web-agent.bat @@ -79,7 +79,7 @@ if %ERRORLEVEL% equ 0 ( if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms1g -Xmx1g -server -XX:+AggressiveOpts -XX:MaxMetaspaceSize=256m ) -set JVM_OPTS=%JVM_OPTS% -Djava.util.logging.config.file=java.util.logging.properties -Djava.net.useSystemProxies=true +set JVM_OPTS=%JVM_OPTS% -Djava.net.useSystemProxies=true "%JAVA_HOME%\bin\java.exe" %JVM_OPTS% -cp "*" org.apache.ignite.console.agent.AgentLauncher %* http://git-wip-us.apache.org/repos/asf/ignite/blob/f3f2f82f/modules/web-console/web-agent/bin/ignite-web-agent.sh ---------------------------------------------------------------------- diff --git a/modules/web-console/web-agent/bin/ignite-web-agent.sh b/modules/web-console/web-agent/bin/ignite-web-agent.sh index c687ebe..530bc7f 100644 --- a/modules/web-console/web-agent/bin/ignite-web-agent.sh +++ b/modules/web-console/web-agent/bin/ignite-web-agent.sh @@ -93,6 +93,6 @@ if [ -z "$JVM_OPTS" ] ; then fi fi -JVM_OPTS="${JVM_OPTS} -Djava.util.logging.config.file=java.util.logging.properties -Djava.net.useSystemProxies=true" +JVM_OPTS="${JVM_OPTS} -Djava.net.useSystemProxies=true" "$JAVA" ${JVM_OPTS} -cp "*" org.apache.ignite.console.agent.AgentLauncher "$@" http://git-wip-us.apache.org/repos/asf/ignite/blob/f3f2f82f/modules/web-console/web-agent/config/java.util.logging.properties ---------------------------------------------------------------------- diff --git a/modules/web-console/web-agent/config/java.util.logging.properties b/modules/web-console/web-agent/config/java.util.logging.properties deleted file mode 100644 index f68af5b..0000000 --- a/modules/web-console/web-agent/config/java.util.logging.properties +++ /dev/null @@ -1,74 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -######################################################################### -# Default java.util.logging configuration for Ignite. -# -# To use another config file use `java.util.logging.config.file` system -# property. For example `java -Djava.util.logging.config.file=myfile` -######################################################################### - -# -# Comma-separated list of logging "handlers". Note that some of them may be -# reconfigured (or even removed) at runtime according to system properties. -# -# By default all messages will be passed to console and file. -# -handlers=java.util.logging.ConsoleHandler, org.apache.ignite.logger.java.JavaLoggerFileHandler - -# -# Default global logging level. -# This specifies which kinds of events are logged across all loggers. -# For any given category this global level can be overriden by a category -# specific level. -# Note that handlers also have a separate level setting to limit messages -# printed through it. -# -.level=INFO - -# -# Uncomment to allow debug messages for entire Ignite package. -# -#org.apache.ignite.level=FINE - -# -# Uncomment this line to enable cache query execution tracing. -# -#org.apache.ignite.cache.queries.level=FINE - -# -# Uncomment to disable courtesy notices, such as SPI configuration -# consistency warnings. -# -#org.apache.ignite.CourtesyConfigNotice.level=OFF - -# -# Console handler logs all messages with importance level `INFO` and above -# into standard error stream (`System.err`). -# -java.util.logging.ConsoleHandler.formatter=org.apache.ignite.logger.java.JavaLoggerFormatter -java.util.logging.ConsoleHandler.level=INFO - -# -# File handler logs all messages into files with pattern `ignite-%{id8}.%g.log` -# under `$IGNITE_HOME/work/log/` directory. The placeholder `%{id8}` is a truncated node ID. -# -org.apache.ignite.logger.java.JavaLoggerFileHandler.formatter=org.apache.ignite.logger.java.JavaLoggerFormatter -org.apache.ignite.logger.java.JavaLoggerFileHandler.pattern=ignite-%{id8}.%g.log -org.apache.ignite.logger.java.JavaLoggerFileHandler.level=INFO -org.apache.ignite.logger.java.JavaLoggerFileHandler.limit=10485760 -org.apache.ignite.logger.java.JavaLoggerFileHandler.count=10 http://git-wip-us.apache.org/repos/asf/ignite/blob/f3f2f82f/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java ---------------------------------------------------------------------- diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java index 2555ee1..6c54786 100644 --- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java +++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentClusterDemo.java @@ -115,6 +115,8 @@ public class AgentClusterDemo { throws IgniteCheckedException { IgniteConfiguration cfg = new IgniteConfiguration(); + cfg.setGridLogger(new Slf4jLogger()); + cfg.setIgniteInstanceName((client ? CLN_NODE_NAME : SRV_NODE_NAME) + gridIdx); cfg.setLocalHost("127.0.0.1"); cfg.setEventStorageSpi(new MemoryEventStorageSpi()); @@ -180,8 +182,7 @@ public class AgentClusterDemo { cfg.setDataStorageConfiguration(dataStorageCfg); - if (client) - cfg.setClientMode(true); + cfg.setClientMode(client); return cfg; }