There may be circumstances where you need to turn on debug logging for indexing (e.g. when automatic indexing is not occurring or you are getting errors related to indexing).
Enabling debugging for indexing temporarily
From Administration >> Logging and Profiling
, add the following package, and set to DEBUG:
com.atlassian.confluence.search.lucene
Enabling debugging for indexing permanently
- Edit
<CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties
file and addlog4j.logger.com.atlassian.confluence.search.lucene=DEBUG
- 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.