Where can I check the log from log.info("XXX") commands made in a groovy script

Steven VanderVelde August 9, 2022

Check log after log.info() calls have been made from a groovy script

1 answer

1 accepted

4 votes
Answer accepted
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2022

Hi @Steven VanderVelde 

It should be in JIRA_HOME/log

If you are using Scriptrunner there is the history of the last 15 execution that display the log by clicking on the faild or success logo.

srLogs.PNG

 

If you are not able to see it in the file, you need to change the log level or log using log.error()

Steven VanderVelde August 9, 2022

okay thanks! Where is JIRA_HOME/log? somewhere on JIRA?

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2022

JIRA_HOME is on the server and the path that have been defined during the installation.

 

If you want to set the log level within the script you can do it like that:

import org.apache.log4j.Logger
import org.apache.log4j.Level

def log = Logger.getLogger("com.test.listener")
log.setLevel(Level.INFO)
log.warn event
log.error event
log.info event

You can also check the log from the JIRA using Scriptrunner by going to Built-in Script in Scriptrunner > view logs and select atlassian-jira.log that is the file you are looking for .

Like Steven VanderVelde likes this

Suggest an answer

Log in or Sign up to answer