You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Artem Shutak <as...@gridgain.com> on 2015/05/18 16:47:58 UTC
Re: Disable ignite console logs ...
Hi,
I do not exactly understand what do you want...
How do you run ignite: from code or via ignite.<sh|bat>?
Anyway, a better way to work with ignite logging use ignite-log4j and
properly configure it.
And, if you don't want to see any logs at console you can simply redirect
all output of process to file.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p319.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by myset <cr...@myset.ro>.
Thank you for answer,
I use pretty the same log4j2 configuration but still remain in console some
ignite logs in standard format
Even if I change level or line pattern all those line remain in the same
format.
Artem Shutak wrote
> 3. Please, check your ignite/log4j2 configuration and etc.
> If you will still see any logs at console, when I need more information to
> next investigations (double check your env. variables). In best case it
> should be simple example as I provide at point 2 with:
> - java-code example to run Ignite
> - log4j2 configuration
> - logs that you see at console.
[18:37:01] Configured plugins:
[18:37:01] ^-- None
[18:37:01]
[18:37:01] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[18:37:01]
[18:37:01] Ignite node started OK (id=76d313ad, grid=myset)
[18:37:01] Topology snapshot [ver=1, nodes=1, CPUs=8, heap=0.89GB]
I'll follow recommended issue status.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p348.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by Artem Shutak <as...@gridgain.com>.
Hi,
1. I was a little wrong and it's enough for workflow to configure separate
logger for "org.ignite.logger" in INFO or higher (not in DEBUG or higher)
level.
2. I have test
public static void main(String[] args) throws InterruptedException {
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setGridLogger(new IgniteJclLogger());
try(Ignite ignite = Ignition.start(cfg)) {
Thread.sleep(100_000);
}
}
with log4j2 configuration:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level
%logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="org.apache.ignite" level="INFO" additivity="false">
</Logger>
<Root level="DEBUG">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
I run this test without some env. variables (without IGNITE_QUITE and etc.)
and don't see any logs at console.
3. Please, check your ignite/log4j2 configuration and etc.
If you will still see any logs at console, when I need more information to
next investigations (double check your env. variables). In best case it
should be simple example as I provide at point 2 with:
- java-code example to run Ignite
- log4j2 configuration
- logs that you see at console.
4. To track progress about the current bug, please, see at
https://issues.apache.org/jira/browse/IGNITE-923.
Also, I can propose to contribute at Ignite and fix this by yourself! It
would be really great!
Ok, I think to next investigations I need more information:
-
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p339.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by myset <cr...@myset.ro>.
Thank you for answer Artem
All logs are well configured and everything works well in terms of ignite
logging (my case JCL).
Some log lines still remain in console in standard ignite log line pattern
... seems to be a bug ...
Artem Shutak wrote
> In some cases Ignite print some messages directly at System.out. For me,
> it looks like a bug. I filed:
> https://issues.apache.org/jira/browse/IGNITE-923.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p335.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by Artem Shutak <as...@gridgain.com>.
Hi,
In some cases Ignite print some messages directly at System.out. For me, it
looks like a bug. I filed: https://issues.apache.org/jira/browse/IGNITE-923.
I can suggest workflow while the bug is not fixed. Need to configure
separate logger for "org.ignite.logger" in DEBUG (or higher) level:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level
%logger{36} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="org.apache.ignite" level="DEBUG" additivity="false">
</Logger>
<Root level="DEBUG">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
Also, I want to suggest to check that you configured jcl logger properly:
- java way
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setGridLogger(new IgniteJclLogger());
- spring
<property name="gridLogger">
<bean class="org.apache.ignite.logger.jcl.JclLogger"/>
</property>
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p333.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by myset <cr...@myset.ro>.
I'd turned off all JCL - log4j2 (thresholds and appenders) and still
remain the following (and many other)
[09:13:17] Configured plugins:
[09:13:17] ^-- None
[09:13:17]
[09:13:18] To start Console Management & Monitoring run
ignitevisorcmd.{sh|bat}
[09:13:18]
[09:13:18] Ignite node started OK (id=18e9f48a, grid=myset)
[09:13:18] Topology snapshot [ver=1, nodes=1, CPUs=8, heap=0.89GB]
Why the following properties doesn't work ?
-DIGNITE_QUIET=true - not working
-DIGNITE_CONSOLE_APPENDER=false - not
working
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p330.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by dsetrakyan <ds...@apache.org>.
myset wrote
> I'm using IgniteSpringBean initialisation class and JCL with log4j2.
I this case I believe you need to disable the ConsoleAppender for System OUT
and ERROR.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p325.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by myset <cr...@myset.ro>.
On 18/05/15 21:12, myset [via Apache Ignite Users] wrote:
> I'm using IgniteSpringBean initialisation class and JCL with log4j2.
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p321.html
>
> To unsubscribe from Disable ignite console logs ..., click here
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=310&code=Y3Jpc3RpLmZsb3Jlc2N1QG15c2V0LnJvfDMxMHwxMTIxNzkxMzc2>.
> NAML
> <http://apache-ignite-users.70518.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p322.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by myset <cr...@myset.ro>.
I'm using IgniteSpringBean initialisation class and JCL with log4j2.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p321.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Disable ignite console logs ...
Posted by Artem Shutak <as...@gridgain.com>.
More detailed answer:
1. To enable log4j
- at ignite.{sh|bat} case, just copy ignite-log4j directory from
libs/optional to libs/.
- if you use maven, then add maven dependency
<dependency>
<groupId>org.apache.ignite</groupId>
<artifactId>ignite-log4j</artifactId>
<version>${ignite.version}</version>
</dependency>
2. If you want use java logging then see at
config/java.util.logging.properties and provide your own configuration. From
the file comments:
# 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`
3. For more information about options which you are use, see at
org.apache.ignite.IgniteSystemProperties documentation. For example, javadoc
for IGNITE_QUIET says:
* Set to either true or false to enable or disable quiet mode
* of Ignite. In quiet mode, only warning and errors are printed into
the log
* additionally to a shortened version of standard output on the start.
*
* Note that if you use ignite.{sh|bat} scripts to start Ignite they
* start by default in quiet mode. You can supply -v flag to override
it.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-tp310p320.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.