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

Artem Shutak updated IGNITE-923:
--------------------------------
    Description: 
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 say:
{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}

  was:
The bug is based on user ticket: 
http://apache-ignite-users.70518.x6.nabble.com/Disable-ignite-console-logs-td310.html#a330.

Current implementation
{code}
    @Override public boolean isQuiet() {
        return !isInfoEnabled() && !isDebugEnabled();
    }
{code}



There are a workflow (to disable all Ignite messages): need to delete 
appenderes for "org.apache.ignite". 
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="DEBUG" additivity="false">
            <!--Don't log at console.-->
        </Logger>
        <Root level="DEBUG">
            <AppenderRef ref="Console"/>
        </Root>
    </Loggers>
</Configuration>
{code}


> IgniteJclLogger.isQuiet() implementation has a bug.
> ---------------------------------------------------
>
>                 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 say:
> {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