How to turn on debugging for indexing

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

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.

Index debug logging is quite verbose, resulting in a significant increase in reindexing time if enabled. During testing, we measured an increase of about 3 times for the same data set, so use this logging only when it is really needed. Contact Atlassian support if you have any questions.


ソリューション

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. 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 以降

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. 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


Logging to a separate file (prior to 7.13)

It is also possible to log index logging to another file as discussed in Configuring log4j in Confluence to send specific entries to a different log file by adding the following to <CONFLUENCE_INSTALL>/confluence/WEB-INF/classes/log4j.properties:



log4j.appender.indexlog=org.apache.log4j.RollingFileAppender
log4j.appender.indexlog.Threshold=DEBUG
log4j.appender.indexlog.File=${catalina.home}/logs/atlassian-confluence-index.log
log4j.appender.indexlog.MaxFileSize=20480KB
log4j.appender.indexlog.MaxBackupIndex=5
log4j.appender.indexlog.layout=com.atlassian.confluence.util.PatternLayoutWithStackTrace
log4j.appender.brokenpipelog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n


log4j.logger.com.atlassian.confluence.search.lucene=DEBUG, indexlog
log4j.additivity.com.atlassian.confluence.search.lucene=false

log4j.logger.com.atlassian.confluence.internal.index.AbstractBatchIndexer=DEBUG, indexlog
log4j.additivity.com.atlassian.confluence.internal.index.AbstractBatchIndexer=false


This will log to <CONFLUENCE_HOME>/logs/atlassian-confluence-index.log. 

(lightbulb)Confluence 7.13 and above adds this file logging by default and the classes only need to be turned up via Administration >> Logging and Profiling.











最終更新日: 2022 年 2 月 23 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.