Akka 2.3 Play 2.3.3 excessive debug log on catalina.out

14 views
Skip to first unread message

rey bumalay

unread,
Feb 4, 2020, 11:57:30 AM2/4/20
to Akka User List
So we have an old application which have been running on production on Tomcat7 for over 5 years and we tried to use the following configuration to avoid excessive debug log but it seems not working:

akka {
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
  loglevel = "DEBUG"
  stdout-loglevel = "INFO"
  jvm-exit-on-fatal-error = off
  log-config-on-start = on
}

play {
  akka {
    loggers = ["akka.event.slf4j.Slf4jLogger"]
    loglevel = "DEBUG"
    logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
    stdout-loglevel = "OFF"
  }
}

On development, this works correctly but on production, this continue to log debug hibernate messages to catalina.out which would generate very large amount of log due to the feature we recently implemented that process very large number of data at the same time. We also checked and logback seems to be working correctly on Tomcat7 in production as the application.log gets the correct log based on configuration below but Akka somehow continue to send logs to catalina.out or stdout.

The application-logger.xml also contains the necessary codes to supposedly stop hibernate debug logs from appearing but it seems not working:

<configuration>

    <conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" />

    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <file>${application.home}/logs/application.log</file>
        <encoder>
            <pattern>%d - %coloredLevel - [%thread] - %logger - %message%n%xException</pattern>
        </encoder>
    </appender>

    <logger name="play" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="application" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="akka" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="akka.event.slf4j.Slf4jLogger" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.springframework" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.mchange" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.apache" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.hibernate" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.hibernate.engine" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.hibernate.event" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <logger name="org.hibernate.hql" level="INFO" additivity="false">
        <appender-ref ref="FILE" />
    </logger>

    <root level="OFF">
        <appender-ref ref="FILE" />
    </root>

</configuration>

catalina.out logs

1154433 [application-akka.actor.default-dispatcher-39] DEBUG org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction  - committed JDBC Connection
1154433 [application-akka.actor.default-dispatcher-39] DEBUG org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction  - re-enabling autocommit
1154433 [application-akka.actor.default-dispatcher-39] DEBUG org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl  - HHH000420: Closing un-released batch
1154433 [application-akka.actor.default-dispatcher-39] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl  - Releasing JDBC connection
1154433 [application-akka.actor.default-dispatcher-39] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl  - Released JDBC connection
1154433 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.transaction.spi.AbstractTransactionImpl  - begin
1154434 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl  - Obtaining JDBC connection
1154434 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl  - Obtained JDBC connection
1154434 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction  - initial autocommit status: true
1154434 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction  - disabling autocommit
1154438 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.transaction.spi.AbstractTransactionImpl  - committing
1154438 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction  - committed JDBC Connection
1154438 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction  - re-enabling autocommit
1154438 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl  - Releasing JDBC connection
1154438 [application-akka.actor.default-dispatcher-40] DEBUG org.hibernate.engine.jdbc.internal.LogicalConnectionImpl  - Released JDBC connection

The following environment variable are also set which they seem to be working:

-Dlogback.configurationFile=application-logger.xml
-Dlogger.resource=application-logger.xml
-Dlogback.debug=true



We also checked and one option was to upgrade to Akka 2.4 but is there a way to get rid of this debug log without having to upgrade first? The application is quite old and we aren't ready to move to Java 8 yet.

Thanks


Reply all
Reply to author
Forward
0 new messages