[ 
https://issues.apache.org/jira/browse/IGNITE-923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Artem Shutak updated IGNITE-923:
--------------------------------
    Summary: IgniteLogger.isQuiet() implementations are inconsistent.  (was: 
IgniteJclLogger.isQuiet() implementation has a bug.)

> IgniteLogger.isQuiet() implementations are inconsistent.
> --------------------------------------------------------
>
>                 Key: IGNITE-923
>                 URL: https://issues.apache.org/jira/browse/IGNITE-923
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Artem Shutak
>            Priority: Minor
>
> The bug is based on user ticket: 
> http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-td310.html#a330.
> Current implementation of IgniteJclLogger.isQuiet() 
> {code}
>     @Override public boolean isQuiet() {
>         return !isInfoEnabled() && !isDebugEnabled();
>     }
> {code}
> Current implementation of Log4JLogger.isQuiet() related to IGNITE_QUITE 
> command line property.
> IgniteLogger.isQuiet() javadoc says:
> {noformat}
>     /**
>      * Tests whether {@code info} and {@code debug} levels are turned off.
>      *
>      * @return Whether {@code info} and {@code debug} levels are turned off.
>      */
> {noformat}
> I think Log4JLogger has right implementation and we should change javadoc and 
> fix IgniteJclLogger.isQuiet().
> There are a workflow for user request (to disable all Ignite messages): need 
> to configure separate logger for "org.ignite.logger" in INFO (or higher) 
> level: 
> For example (JCL with log4j2):
> {code}
> <?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">
>             <!--Don't log at console.-->
>         </Logger>
>         <Root level="INFO">
>             <AppenderRef ref="Console"/>
>         </Root>
>     </Loggers>
> </Configuration>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to