Debugging or logging a custom service

How can I debug or log my own Jira service?

I am developping in eclipse and when I am debugging my JUnit test, I get the error "ComponentAccessor has not been initialised.". I tried to log: "Logger.getInstance(getClass()).error(e.getMessage());".

2 answers

1 accepted

0 votes
Colin Goudie Community Champion Apr 25, 2013

If you are using log4j or slf4j you will need a log4j.properties (or xml) in your src/test/resources path so it knows how to log

I want to log while the service is running within Jira.

Actually there is logged:

2013-04-26 10:56:48,878 QuartzWorker-1 DEBUG ServiceRunner [atlassian.jira.service.ServiceRunner] Running Service [Container: main.java.com.me.services.MyService delay [60000ms]]
2013-04-26 10:56:48,894 QuartzWorker-1 ERROR ServiceRunner MyService [com.me.services.MyService]
2013-04-26 10:56:48,894 QuartzWorker-1 DEBUG ServiceRunner [atlassian.jira.service.ServiceRunner] Finished Running Service [Container: main.java.com.me.services.MyService delay [60000ms]]

I want to log while the service is running within Jira.

Actually there is logged:

2013-04-26 10:56:48,878 QuartzWorker-1 DEBUG ServiceRunner [atlassian.jira.service.ServiceRunner] Running Service [Container: main.java.com.me.services.MyService delay [60000ms]]
2013-04-26 10:56:48,894 QuartzWorker-1 ERROR ServiceRunner MyService [com.me.services.MyService]
2013-04-26 10:56:48,894 QuartzWorker-1 DEBUG ServiceRunner [atlassian.jira.service.ServiceRunner] Finished Running Service [Container: main.java.com.me.services.MyService delay [60000ms]]

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,968 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot