10 Replies Latest reply on Feb 1, 2016 9:23 PM by tener tian

    Change log level of passivation log messages

    Timothy Tong Newbie

      Hi,

       

      Is there a way to change the logging level of the passivation manager to DEBUG? Our production logs are becoming somewhat muddied by this extra text:

       

      Oct 19, 2015 11:52:26 org.infinispan.eviction.impl.PassivationManagerImpl passivateAll
      INFO: ISPN000029: Passivating all entries to disk
      Oct 19, 2015 11:52:26 org.infinispan.eviction.impl.PassivationManagerImpl passivateAll
      INFO: ISPN000030: Passivated 0 entries in 0 milliseconds
      

       

      Thank you for your help.

        • 1. Re: Change log level of passivation log messages
          Galder Zamarreño Master

          I've created [ISPN-5904] to fix this. In the mean time, you can add a category to your logging framework to filter messages in that package, e.g. set log level for package "org.infinispan.eviction.impl" to WARN.

          • 2. Re: Change log level of passivation log messages
            tener tian Newbie

            did you solved this issue?i meet this problem use java command to start application, error like this:

             

            Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'secondCacheManager': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'platformCache' defined in URL [file:/usr/server/installed/publish/mgr/conf/spring/application-cxt.ml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.infinispan.commons.api.BasicCache]: Factory method 'getCache' threw exception; nested exception is org.infinispan.commons.CacheException: Unable to invoke method private void org.infinispan.interceptors.InterceptorChain.printChainInfo() on object of type InterceptorChain

            at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:311)

            Caused by: java.lang.NoSuchMethodError: org.infinispan.util.logging.Log.debugf(Ljava/lang/String;I)V

            at org.infinispan.interceptors.InterceptorChain.printChainInfo(InterceptorChain.java:55)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

            at java.lang.reflect.Method.invoke(Method.java:497)

            at org.infinispan.commons.util.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:168)

            • 3. Re: Change log level of passivation log messages
              Tristan Tarrant Master

              What Infinispan jars do you have in your classpath ?

              • 5. Re: Change log level of passivation log messages
                Tristan Tarrant Master

                Yes, but what I really meant for you to list all included infinispan jars.

                • 6. Re: Change log level of passivation log messages
                  tener tian Newbie

                  the included jars like :
                  infinispan-cachestore-jdbc-8.1.0.Final.jar
                  infinispan-cachestore-jpa-8.1.0.Final.jar
                  infinispan-cachestore-leveldb-8.1.0.Final.jar
                  infinispan-cachestore-redis-8.0.0.Final.jar
                  infinispan-cachestore-remote-8.1.0.Final.jar
                  infinispan-cdi-common-8.1.0.Final.jar
                  infinispan-cdi-embedded-8.1.0.Final.jar
                  infinispan-commons-8.0.0.Final.jar
                  infinispan-commons-8.1.0.Final.jar
                  infinispan-core-8.0.0.Final.jar
                  infinispan-core-8.1.0.Final.jar
                  infinispan-embedded-8.1.0.Final.jar
                  infinispan-jcache-8.1.0.Final.jar
                  infinispan-jcache-commons-8.1.0.Final.jar

                   

                  And the log4j.properties like this:

                  # DONOT as DEBUG(infinispan error for log)
                  log4j.rootLogger=debug, stdout,R

                  #infinispan
                  #log4j.logger.org.infinispan=warn
                  #configure like this will be ok in tomcat, but it's error for java-command yet
                  log4j.category.org.infinispan=warn

                  #File
                  log4j.appender.R=org.apache.log4j.RollingFileAppender
                  log4j.appender.R.File=/usr/log/app/infinispan.log
                  log4j.appender.R.MaxFileSize=10MB
                  log4j.appender.R.layout=org.apache.log4j.PatternLayout
                  log4j.appender.R.MaxBackupIndex=10000
                  log4j.appender.R.Threhold=DEBUG
                  log4j.appender.R.layout.ConversionPattern=%d %-5p Thread[%t] Class[%c] %x MSG[%m]%n
                  log4j.appender.R.Append=true

                  • 7. Re: Change log level of passivation log messages
                    Tristan Tarrant Master

                    You only need infinispan-embedded.

                    Do you need the redis cachestore ?

                    • 8. Re: Change log level of passivation log messages
                      tener tian Newbie

                      ok, try again.

                      we need redis cachestore in infinispan

                      • 9. Re: Change log level of passivation log messages
                        tener tian Newbie

                        the listed infinispan jars download with Maven, my pom like this :

                        infinispan-cachestore-jdbc-8.1.0.Final.jar

                        infinispan-cachestore-jpa-8.1.0.Final.jar

                        infinispan-cachestore-leveldb-8.1.0.Final.jar

                        infinispan-cachestore-redis-8.0.0.Final.jar

                        infinispan-cachestore-remote-8.1.0.Final.jar

                        infinispan-cdi-common-8.1.0.Final.jar

                        infinispan-cdi-embedded-8.1.0.Final.jar

                        infinispan-commons-8.0.0.Final.jar

                        infinispan-commons-8.1.0.Final.jar

                        infinispan-core-8.0.0.Final.jar

                        infinispan-core-8.1.0.Final.jar

                        infinispan-embedded-8.1.0.Final.jar

                        infinispan-jcache-8.1.0.Final.jar

                        infinispan-jcache-commons-8.1.0.Final.jar

                         

                        your mean is only for  infinispan-embedded-8.1.0.Final.jar,  infinispan-cdi-embedded-8.1.0.Final.jar and infinispan-cachestore-redis-8.0.0.Final.jar? thank you.

                        • 10. Re: Change log level of passivation log messages
                          tener tian Newbie

                          well done, i just try do again as your method, it's success, thanks again.

                          this log4j.properties configuration for infinispan's log like log4j.logger.org.infinispan=warn, and remove all other infinispan jars except which contains embedded.

                           

                          thanks a lot