Comment issue post function doesn't show INFO log events

Peter Bengov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2016

When I use Comment issue post function, I add log events for debugging. However, I've noticed INFO events don't work for me. Only when I use log.warn(...) events, they show up in atlassian-jira.log

Even when I've added jmwe.plugins.functions.CommentIssueFunction package to log4j.properties, it's still a no-show. 

When should I do to add there INFO events to my log? 

Could something like this work (as it does in Script Runner):

import org.apache.log4j.Category
def Category log = Category.getInstance("jmwe.plugins.functions.CommentIssueFunction");
log.setLevel(org.apache.log4j.Level.INFO);

1 answer

1 accepted

0 votes
Answer accepted
David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2016

The right package to add to log4j.properties (or in the Logging settings of JIRA admin) is "com.innovalog.groovy" if you want to get the results of log.info() calls in your Groovy script.

Peter Bengov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2016

Hi David,

Thanks for your response. I've tried both adding 

log4j.logger.com.innovalog.groovy = INFO, console, filelog
log4j.additivity.com.innovalog.groovy = false

To log4j.properties as well as adding this package to the Logging settings in JIRA's UI. None showed any log event. 

Is there something else that could be done? 

David _old account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 10, 2016

My bad. The correct package (class, really) is: com.innovalog.jmwe.plugins.functions.CommentIssueFunction

Peter Bengov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 13, 2016

Thanks David. com.innovalog.jmwe.plugins.functions.CommentIssueFunction worked

Suggest an answer

Log in or Sign up to answer