Logging to atlassian-confluence.log with log4j from plug-in running Confluence 7.0.1 from the SDK

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, set the logging level to ALL for the package, 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 running Confluence 7.0.1 using the SDK atlas-run, so the log files are found in target\confluence\home\logs under the build directory, but while there are other log files there:


There is no atlassian-confluence.log at all anywhere on the system (Windows 10 64-bit) and none of these files contain any standard class log4j logging.

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, done everything they suggest, but there is no atlassian-confluence.log file to be found anywhere.

Bit late to the party here, but this is a long-standing problem with building Confluence plugins using the Atlassian SDK (see https://community.atlassian.com/t5/Answers-Developer-Questions/Where-are-the-Log-files-for-plugins-when-using-the-SDK/qaq-p/563066, https://community.atlassian.com/t5/Confluence-questions/Where-is-the-atlassian-confluence-log-file-when-running/qaq-p/1183361, and similar posts). It seems like it ought to be fixable with some log4j config, but I too have yet to find a really satisfying answer. Usually I just read whatever’s in the console.