Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Where is the atlassian-confluence.log file when running Confluence 7.0.1 using the SDK?

Michael Eskin September 19, 2019

I'm a Confluence server plug-in developer and am trying to the log4j system supposedly built into Confluence server to output some diagnostics to the atlassian-confluence.log file.

 

I've got everything setup as far as including the log4j loggers in my plug-in Java sources:

// For logging
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Creating a logger for my class:

private static final Logger log = LoggerFactory.getLogger(VSAdmin.class);

and using calling it:

log.error("\n*********************VSAdmin doGet");

I've added my packages by name to the logging package list in the Confluence Admin interface, both in standard and diagnostic modes, restarted Confluence many times, but there simply is no atlassian-confluence.log file to be found.

Again, this is using the SDK, so the log files are found in target\confluence\home\logs under my build directory, but while there are other log files there:

atlassian-confluence-profiler.log
atlassian-confluence-profiler.log
atlassian-confluence-profiler.log
instrumentation.log

There is no atlassian-confluence.log

Going out of my mind here just trying to get some log info out. I can send log strings to the console, but console output isn't available from our QA server, which is a standard Confluence Server 7.0.1 install.  

Are there other files I need to modify on my SDK instance to get logging to happen?  None of the information on the Atlassian Developer docs have been of any use.

2 answers

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 29, 2021

A few years later and really just cross posting the thread from the developer community started from this one:

https://community.developer.atlassian.com/t/logging-to-atlassian-confluence-log-with-log4j-from-plug-in-running-confluence-7-0-1-from-the-sdk/32020

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2019

Hello Michael,

Thank you for contacting us regarding this. I'm not familiar with using the SDK, but in server instances, the log file is in the Confluence home directory (which might be different than simply a directory called home). 

You can check for the location of the home directory in 

<confluence-installation>/confluence/WEB-INF/classes/confluence-init.properties.

  • Once the initial startup sequence is complete, all logging will be to <confluence-home>/logs/atlassian-confluence.log. For example: c:/confluence/data/logs/atlassian-confluence.log.

For more details, see Working with Confluence Logs.

For more specific help with developing for Confluence with the SDK, I would also recommend that you reach out in our Atlassian Developer Community. That forum is more for developers of add-ons for Atlassian products, whereas this Community is for end-users of Confluence.

Let me know if that helps or if you have any additional questions about this.

Regards,

Shannon

Michael Eskin September 25, 2019

Hi Shannon,

Thank you for the info.

Unfortunately, this apparently does not hold true for the SDK launched Confluence instances run from the command line using the SDK’s atlas-run or atlas-debug command during plug-in development.

In these instances, the atlassian-confluence.log file is not present in the location you describe as it would be for a standard non-SDK started instance. There are the other log files present as I described in my original post, but not this one.

Since we were able to confirm the logging works as you described on on our standard non-SDK Confluence QA group installation, I may just include both console-based for the SDK version and log4j code for the standard installation in my code so we can get logging in both environments.

Cheers,

Michael

Like Shannon S likes this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2019

Michael,

Thank you for letting me know that. You can go ahead and try what you have suggested, but if you do have any further issues with your SDK environment, then you can go ahead and follow-up on the Developer Community and they will be able to assist you.

Thank you for your understanding!

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events