Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-923

IgniteLogger.isQuiet() implementations are inconsistent.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

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

      1. IgniteLogger.isQuiet() javadoc says:

          /**
           * Tests whether {@code info} and {@code debug} levels are turned off.
           *
           * @return Whether {@code info} and {@code debug} levels are turned off.
           */
      

      Current implementation of IgniteJclLogger.isQuiet() (accroding to javadoc).

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

      Current implementation of Log4JLogger.isQuiet() related to IGNITE_QUITE command line property.

      I think Log4JLogger has right implementation and we should change javadoc and fix IgniteJclLogger.isQuiet().

      2. 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):

      <?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>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ashutak Artem Shutak
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: