Loggin Scripts
You can get a long with way with logging statements, which you can do by adjusting the log level, and “tailing” your log file, normally atlassian-jira.log (usually located in the path {JIRA_HOME}/log ).
Add the following lines to your log4j.properties (usually located in the path {TOMCAT_ROOT}/webapps/ROOT/WEB-INF/classes):
log4j.category.com.onresolve.jira.groovy = DEBUG, console, filelog log4j.additivity.com.onresolve.jira.groovy = false
If your script fails for some reason a stack trace will be dumped in the logs.
Alternately, you can change the log levels without a restart from within your (groovy in this example) script:
import org.apache.log4j.Category
def Category log = Category.getInstance("com.onresolve.jira.groovy")
log.setLevel(org.apache.log4j.Level.DEBUG)
log.debug "debug statements"
Reblogged this on Dinesh Ram Kali..
LikeLike