vendredi 27 avril 2018

Logging SQL in Grails 3.3.1 unit tests

When running unit tests in Grails 3.3.1, how can I view the SQL logging? I can view the SQL logging when running the application normally using the settings below.

application.yml

    hibernate:
        format_sql: true


    test:
        dataSource:
              logSql: true
    development:
        dataSource:
              logSql: true

logback.groovy

logger 'org.hibernate.type.descriptor.sql.BasicBinder', TRACE, ['STDOUT']
logger 'org.hibernate.SQL', TRACE, ['STDOUT']

Aucun commentaire:

Enregistrer un commentaire