How can I use logger for JIRA PLUGIN MODULE?

I want to use logger with log level which is debug…
When I use a logger with error level , I got messages which written in the atlassian-jira.log…
However, when I use a log with info, debug, and so one… I have got any kinds of messages from it…

Is it possible to write my messages to it or do I have to make my own properties ??

Hi @munman77,

Welcome to the community!

Do you mean use the LoggerFactory to log your messages?

Cheers,
Anne

So if I understand correctly, you already got this going in your class:

private static final Logger LOGGER = LoggerFactory.getLogger(YourClass.class);

And when you do LOGGER.error("oopsie woopsie"); you can see the message in atlassian-jira.log but when you do LOGGER.info("I need more coffee"); the message doesn’t appear?

This is most likely because you haven’t set a log level for you app. If you want to see debug logs for your app you will need to set the logging level your apps package to DEBUG. See here for how to do this:

https://confluence.atlassian.com/jirakb/how-to-set-logging-level-for-a-package-in-jira-629178605.html

Yes… Just I want to use log with debug level rather than error level

Thanks for your answer…

1 Like

Did my answer actually solve your problem? If yes you can mark my answer as the solution so this topic will be shown as resolved. :slight_smile: