'm using the latest version of both Jira Service Desk Server and Scriptrunner.
I can write to the log file in the Scriptrunner console with
log.info("Test")
but when I put this in a behaviour initialiser it does not write to the same log file. Shouldn't it write to the log every time the request form is loaded?
It writes to the same file...
Here are 3 examples with the same 3 lines of code:
log.info "info"
log.debug "debug"
log.error "error"
In the console:
[...] url:/rest/scriptrunner/latest/user/exec/ username:p6s INFO p6s 916x226878x1 1latest/user/exec/ [c.o.scriptrunner.runner.ScriptBindingsManager] info
[...] url:/rest/scriptrunner/latest/user/exec/ username:p6s ERROR p6s 916x226878x1 /latest/user/exec/ [c.o.scriptrunner.runner.ScriptBindingsManager] error
In a behavior initializer (jira mapping)
[...] url:/rest/scriptrun...lidatorsByPid.json username:p6s INFO p6s 916x226866x1 1behaviours/latest/validatorsByPid.json [c.o.scriptrunner.runner.ScriptBindingsManager] info
[...] url:/rest/scriptrun...lidatorsByPid.json username:p6s ERROR p6s 916x226866x1 /behaviours/latest/validatorsByPid.json [c.o.scriptrunner.runner.ScriptBindingsManager] error
In a behavior initializer (jsd mapping)
[...] url:/rest/scriptrun...lidatorsByPid.json username:p6s INFO p6s 919x227023x1 1behaviours/latest/jsd/jsd/validatorsByPid.json [c.o.scriptrunner.runner.ScriptBindingsManager] info
[...] url:/rest/scriptrun...lidatorsByPid.json username:p6s ERROR p6s 919x227023x1 /behaviours/latest/jsd/jsd/validatorsByPid.json [c.o.scriptrunner.runner.ScriptBindingsManager] error
All 3 log extracts came from atlassian-jira.log. I removed the date/time etc to keep the lines shorter.
Notice that the "debug" statements were not printed. That's because my log level for com.onresolve.scriptrunner.runner.ScriptBindingsManager is set to INFO. You can change from Loggin and Profiling.
Or using code:
log.setLevel(org.apache.log4j.Level.DEBUG)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.