Hi,
Has anyone encountered with problems regarding log outputs in Scriptrunner on the latest long-term support release of Jira Server? No matter if in consoles or post functions, no logs are being displayed - I am using the following code snippet which has always worked for me and after upgrading to the latest version of Jira, Scriptrunner has stopped writing logs.
import org.apache.log4j.Logger
import org.apache.log4j.Level
def log = Logger.getLogger("Log:")
log.setLevel(Level.INFO)
log.info("Help")
I didn't find any information that org.apache.log4j.Logger has been Deprecated, am I missing something? The version of Scriptrunner we use is 6.38.0
BR
You could use:
def log = Logger.getLogger("com.acme.*")
instead of
def log = Logger.getLogger("Log:")
I don't know what "Log:" is. Something about that looks off.
Also, unless I'm using the log inside of a class to be called from another script, I just use this one liner. No need for anything else. It's so much cleaner:
log.setLevel(org.apache.log4j.Level.INFO)
Hi @Marko Slijepčević I did not encounter this issue but I'd check server log files. Can you do it? And what about logging error level? Did you try it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Martin Bayer _MoroSystems_ s_r_o__
I checked the server log files, nothing suspicious there. I have tried to log on all logging levels as well, but nothing happens at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hm, this is weird, I just tested it on the same version of script runner and it works fine. I also tried to create new log appender https://scriptrunner.adaptavist.com/5.3.9/jira/recipes/misc/log-to-SR-file.html but it always put the log to the log tab. I'm afraid I can't help with this :(
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.