How to turn on debugging for indexing

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

For when automatic indexing is not occurring or you are getting errors related to indexing, these may be circumstances where you need to turn on debug logging for indexing.

Solution

Confluence 5.9 and below...

Enabling debugging for indexing temporarily

From Administration >> Logging and Profiling, add the following package, and set to DEBUG:

com.atlassian.confluence.search.lucene
com.atlassian.bonnie

Enabling debugging for indexing permanently

  1. Edit <CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties file and add

    log4j.logger.com.atlassian.confluence.search.lucene=DEBUG
    log4j.logger.com.atlassian.bonnie=DEBUG
  2. Restart Confluence

Logging should appear in the <CONFLUENCE_HOME>/logs/atlassian-confluence.log file, like the following:

2009-10-01 08:50:07,633 DEBUG [http-8080-6] [search.lucene.queue.DatabaseIndexTaskQueue] enqueue Enqueuing task: IndexQueueEntry{id=0, handle='com.atlassian.confluence.pages.Page-91258884', type=Unknown, creationDate=Thu Oct 01 08:50:07 EDT 2009}
2009-10-01 08:50:07,635 DEBUG [http-8080-6] [search.lucene.queue.DatabaseIndexTaskQueue] enqueue Enqueuing task: IndexQueueEntry{id=0, handle='com.atlassian.confluence.pages.Page-91258884', type=Unknown, creationDate=Thu Oct 01 08:50:07 EDT 2009}
2009-10-01 08:50:08,023 DEBUG [DefaultQuartzScheduler_Worker-7] [search.lucene.queue.DatabaseIndexTaskQueue] getUnflushedEntries Fetching index entries added since: Thu Oct 01 08:50:06 EDT 2009
2009-10-01 08:50:08,027 DEBUG [DefaultQuartzScheduler_Worker-7] [search.lucene.queue.DatabaseIndexTaskQueue] getUnflushedEntries Fetched 2 entries from datbase.
2009-10-01 08:50:08,027 DEBUG [DefaultQuartzScheduler_Worker-7] [search.lucene.queue.DatabaseIndexTaskQueue] getUnflushedEntries Having excluded entries that have previously been flushed, 2 entries remain.

Confluence 5.10 and above

Enabling debugging for indexing temporarily

From Administration >> Logging and Profiling, add the following package, and set to DEBUG:

com.atlassian.confluence.internal.index.AbstractBatchIndexer
com.atlassian.confluence.search.lucene
com.atlassian.bonnie.search.extractor

For very verbose logging set the full package to DEBUG, instead of just AbstractBatchIndexer (this can cause space issues on instances with lots of data):

com.atlassian.confluence.internal.index

Enabling debugging for indexing permanently

  1. Edit <CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties file and add

    1. For simple progress logging:

      log4j.logger.com.atlassian.confluence.internal.index.AbstractBatchIndexer=DEBUG
      log4j.logger.com.atlassian.confluence.search.lucene=DEBUG
    2. For very verbose logging add the full package instead of just AbstractBatchIndexer (this can cause space issues on instances with lots of data):

      log4j.logger.com.atlassian.confluence.internal.index=DEBUG
  2. Restart Confluence

Logging should appear in the <CONFLUENCE_HOME>/logs/atlassian-confluence.log file, like the following:

2017-04-06 13:23:56,853 DEBUG [Caesium-1-1] [confluence.search.lucene.LuceneIndexManager] flushQueue Flush requested
2017-04-06 13:23:56,923 DEBUG [Caesium-1-1] [confluence.search.lucene.PluggableSearcherInitialisation] initialise Warming up searcher..
2017-04-06 13:23:56,923 DEBUG [Caesium-1-1] [confluence.search.lucene.DefaultSearcherInitialisation] initialise Warming up searcher..
2017-04-06 13:23:56,927 DEBUG [Caesium-1-1] [confluence.search.lucene.LuceneIndexManager] flushQueue Flushed 4 items in 72 milliseconds



Last modified on Mar 29, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.