getodk / validate

ODK Validate is a Java application for confirming that a form is valid and compliant with the ODK XForms specification. Contribute and make the world a better place! ✨🔍✨
https://docs.getodk.org/validate/
Other
9 stars 26 forks source link

Introduction of SLF4J requires Validate to specify logging behavior #58

Closed yanokwa closed 6 years ago

yanokwa commented 6 years ago

Addresses https://github.com/XLSForm/pyxform/pull/213

What has been done to verify that this works as intended?

Confirmed jar builds and shows errors in UI for XML errors and XForm errors

Why is this the best possible solution? Were any other approaches considered?

I think this change makes it so any error messages that JavaRosa wants to log are discarded. I think is what Validate has always done, so this change is more about maintaining the status quote.

Are there any risks to merging this code? If so, what are they?

Yes! We might want the JavaRosa logs to appear somewhere. Also, my understanding of slf4j might be totally wrong.

yanokwa commented 6 years ago

One issue that we might have is the EfforListener class that @kayr added. I think because that class has nothing to do with JavaRosa, this PR does not affect it.

yanokwa commented 6 years ago

Another issue we might have is the redirection of System.out and System.err in FormValidator, but I think that's fine because I've confirmed in my testing that XML errors and XForm errors still show up in the UI.