TimingLogger disable

Hi guys, I have catalina full of TimingLogger logs eg.

INFO org.perf4j.TimingLogger .log line 353 - start[1511878222661] time[101] tag[Scheduling.processTasks]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878223662] time[0] tag[QueryParser.getEntityName()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878223664] time[0] tag[QueryParser.getParamNames()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878223664] time[0] tag[QueryParser.getEntityNameIfSecondaryReturnedInsteadOfMain()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878223665] time[0] tag[QueryParser.getEntityPathIfSecondaryReturnedInsteadOfMain()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878223662] time[101] tag[Scheduling.processTasks]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878224661] time[0] tag[QueryParser.getEntityName()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878224662] time[0] tag[QueryParser.getParamNames()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878224663] time[0] tag[QueryParser.getEntityNameIfSecondaryReturnedInsteadOfMain()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878224664] time[0] tag[QueryParser.getEntityPathIfSecondaryReturnedInsteadOfMain()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878224661] time[102] tag[Scheduling.processTasks]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878225662] time[0] tag[QueryParser.getEntityName()]
INFO org.perf4j.TimingLogger .log line 353 - start[1511878225663] time[0] tag[QueryParser.getParamNames()]

Which in my opinion cause some overhead, I tried to disable all kind of logs with no effect on this one.
Thank you for any advice

You can disable it if you use logback.xml configuration:

<logger name="org.perf4j.TimingLogger" additivity="false" level="WARN"/>

See also:

Thats the problem it is not applied no matter what. I used level=“OFF” before, tried warn no effect also. I also tried Administration->Server Log->Options … org.perf4j.TimingLogger OFF. Still tons of logs. I checked all doc pages about logging without solving this issue.
On clean tomcat on centos7 this project same problem. tried setting in logging.properties org.perf4j.TimingLogger = OFF, with no effect.
Any ideas ? :slight_smile:

First of all, Administration->Server Log->Options will work only until server restart.

Second, we do not use logging.properties files. We use logback.xml file and you can set its location using CATALINA_OPTS variable of tomcat. For instance, our default tomcat sets in bin/setenv.sh:

CATALINA_OPTS="$CATALINA_OPTS -Dlogback.configurationFile=../conf/logback.xml"

I know it should be applied during runtime only, but even during runtime this doesnt work. Creating logback.xml, setenv.sh and setting wont help also.
You can also see in catalina.out

10:57:11,262 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.perf4j.TimingLogger] to OFF

And right after this there are timinglogger messages :slight_smile:

10:57:11,262 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.Docx4jProperties] to ERROR
10:57:11,262 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [ org.xlsx4j.jaxb.Context] to ERROR
10:57:11,262 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.perf4j.TimingLogger] to OFF
10:57:11,262 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.gui.logging.UIPerformanceLogger] to OFF
10:57:11,263 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
10:57:11,264 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@5ed41441 - Registering current configuration as safe fallback point
10:57:11,064 |-INFO in ch.qos.logback.classic.servlet.LogbackServletContainerInitializer@1f0911fa - Adding an instance of  class ch.qos.logback.classic.servlet.LogbackServletContextListener to the current web-app
2017-11-30 10:57:11.423 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppComponents - Using app components: [com.haulmont.cuba, com.haulmont.reports, com.haulmont.fts, com.haulmont.charts, com.haulmont.bpm]
2017-11-30 10:57:11.456 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from classpath:com/mmsystems/mmwf/app.properties
2017-11-30 10:57:11.457 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from /WEB-INF/local.app.properties
2017-11-30 10:57:11.647 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.AppContextLoader - DbmsType of the main database is set to mysql
2017-11-30 10:57:11.893 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.persistence.MappingFileCreator - Creating file /opt/tomcat/webapps/app-core/work/orm.xml
2017-11-30 10:57:11.903 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.persistence.PersistenceConfigProcessor - Creating file /opt/tomcat/webapps/app-core/work/persistence.xml
2017-11-30 10:57:11.968 INFO  [localhost-startStop-1] com.haulmont.cuba.core.sys.CubaCoreApplicationContext - Refreshing com.haulmont.cuba.core.sys.CubaCoreApplicationContext@6aefe595: startup date [Thu Nov 30 10:57:11 CET 2017]; root of context hierarchy
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837196] time[14] tag[Messages.searchFiles]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837217] time[3] tag[Messages.searchClasspath]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837222] time[0] tag[Messages.searchFiles]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837223] time[2] tag[Messages.searchClasspath]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837227] time[0] tag[Messages.searchFiles]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837228] time[1] tag[Messages.searchClasspath]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837231] time[0] tag[Messages.searchFiles]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837232] time[1] tag[Messages.searchClasspath]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837234] time[0] tag[Messages.searchFiles]
INFO org.perf4j.TimingLogger .log line 353 - start[1512035837235] time[1] tag[Messages.searchClasspath]

Could you check if you have log4j implementation in your project dependencies? Did you try the same deployment with empty cuba project?

Hi, I forgot about this question of mine. Just in case anyone will have similar problem. The cause of this in my case was that one of dependency carried another implementation of slf4j which caused conflict and properties were applied to wrong class.
This is example build.gradle part of code that gets rid of this dependency:

    compile('org.vaadin.addon:v-leaflet-editable:1.0.0-b2') {
       exclude group: 'org.slf4j', module: 'slf4j-simple'
    }