• Welcome to KonaKart Community Forum. Please login or sign up.
 

How do I see what SQL is being run by KonaKart?

Started by smudge, July 17, 2018, 02:45:33 pm

Previous topic - Next topic

smudge

How do I see what SQL is being run by KonaKart?

Thanks.

Brian

The easiest way is to enable the log4j2 logging in the konakart-logging.xml file.

In webapps/konakart/WEB-INF/classes/konakart-logging.xml you'll find:

        <!-- KonaKart Persistence layer - Set to INFO to see the SQL (Set to TRACE to see more detail) -->
        <Logger name="com.konakart.db" level="WARN" additivity="false">
            <AppenderRef ref="STDOUT"/>
            <!-- KonaKart File Logger
            <AppenderRef ref="FILE"/>
            End of KonaKart File Logger -->
        </Logger>


As the comment there states....   Set the level to "INFO" to see the SQL.

By default the server will monitor the changes to konakart-logging.xml and load the new configuration (the monitor frequency is defined at the top of that logging file - the number is in seconds) but in development it's often quicker just to restart tomcat (or whatever you use).