Hi, I made the settings described in the article https://scriptrunner.adaptavist.com/6.18.0/jira/advanced-logging.html step 2. And now scriptrunner logs writes to ScriptRunnerLogFile.log, but when I define custom logger in scriptrunner listener, for example
import org.apache.log4j.Level
import org.apache.log4j.Logger
def log = Logger.getLogger("GetWorkflowStep")
log.setLevel(Level.DEBUG)
log.debug ("Test log")
the log is written to the standard atlassian-jira.log file, not to ScriptRunnerLogFile.log
So, what I did wrong?
Thanks
Hi there,
I can confirm that changing your script from:
def log = Logger.getLogger("GetWorkflowStep")
to:
def log = Logger.getLogger("com.onresolve.GetWorkflowStep")
will allow you to print your desired logs to the ScriptRunnerLogFile.log file instead of the atlassian-jira.log file.
Please remember to restart your JIRA instance once you've made the above changes.
Kind regards,
Joe
I have a feeling that the documentation makes all logs that starts with com.onresolve to your ScriptRunnerLogFile.log file. This is due the log4j suggested changes they documented in their KB;
Can you try the following code?
import org.apache.log4j.Level
import org.apache.log4j.Logger
def log = Logger.getLogger("com.onresolve.GetWorkflowStep")
log.setLevel(Level.DEBUG)
log.debug ("Test log")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.