Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Handle warning with Script Listener

kukabgd June 15, 2020

Hi,

I have a scripted field (created with Adaptavist ScriptRunner) that in some cases throws warning that I've definied with:

log.warn("Field change")

Is there a way to catch this warning message ("Field change") with script listener, since I want to add some additional funtionality when this warning is logged?

 

1 answer

1 accepted

0 votes
Answer accepted
Leonard Chew
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.
June 15, 2020

You can't catch a log message.

What you can do is to fire an event instead of writing a warning.
You can then add an event listener to do somthing on the event you have fired.

kukabgd June 15, 2020

I'll try that, thanks for the quick answer. 

Suggest an answer

Log in or Sign up to answer