Is it possible to change the location of the logfile created by custom scripts? I tried the following code without success:
log.addAppender(new FileAppender(new SimpleLayout(),"qweasd.log",false))
I know that the docs mention that you can define a custom FileAppender in something.properties, but I need a way to do this at runtime. If it makes any difference, I tested this snippet using the script console of a local instance of Jira provided by the ScriptRunner sample application. Also, I am aware that it is possible to just create a File and write to that, but I'd very much prefer the comfort of log4j.
The code I posted actually works. The issue was that scriptrunner-samples comes with a broken script-root-config which leads to the new log (and I suppose any other file you'd create as well) being created in
Learn how to use two new reports for next-gen projects in Jira Cloud: Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events