Play framework evolution script error line number

80 views Asked by At

I'm using evolution scripts, via Slick, using the Play Framework to update the schema for a Microsoft SQL Server database.

This largely works great, except that when something goes wrong, I just get a terse error message, with no indication which line of the script caused the error, and—for large scripts—that makes identifying the error time-consuming and challenging.

For example, consider this error:

An evolution has not been applied properly. Please check the problem and resolve it manually before marking it as resolved. -
We got the following error: , while trying to run this SQL script:

That's it.

Is there a way to get the full error message (through a log file, a configuration setting, etc.) that includes the line number and context, etc. with the evolution failure?

1

There are 1 answers

0
FunProg On BEST ANSWER

It took me a while, but I finally figured this out.

I edited the conf/logback.xml file to include the following:

  <logger name="play.api.db.evolutions" level="DEBUG" />

Each statement in the Ups script is then written to logs/application.log as it is executed, together with its result, including detailed error messages.