Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source generation task changes Logback configuration and doesn't change it back #12

Open
ghost opened this issue Mar 20, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 20, 2013

In ScalatePlugin.generateScalateSource, you're doing this--

System.setProperty("logback.configurationFile", logConfig.toString)

-- where, by default, logConfig is the current project directory plus "src/main/resources/logback.xml". However, the property never gets cleared after the task runs.

The result is that if you also have a logback-test.xml, which Logback is supposed to use preferentially, it'll be ignored and you'll waste some time wondering why it keeps insisting on using your production logging settings in a development environment. My workaround has been to add a hook to the compile task (compile andFinally { System.clearProperty("logback.configurationFile"); }), and I guess I could also calculate the absolute path to my logback-test.xml file and set scalateLoggingConfig to that, but I don't think either should be necessary -- the task is just not behaving well here.

@wsh
Copy link

wsh commented Jul 10, 2015

It would be awesome if you all could release a new version so that we could start using this fix. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant