7月 172012
 
Pocket

バグっぽい。

[java title=”org.webcurator.core.store.CrawlLogIndexer抜粋” mark=”10″]
@Override
public void indexFiles(Long harvestResultOid) throws ServiceException {

// sort the crawl.log file to create a sortedcrawl.log file in the same
// directory.
log.info(“Generating ” + sortedLogFileName + ” file for ” + getResult().getTargetInstanceOid());

// create path to log files folder from input directory..
String logPath = directory.getAbsolutePath().substring(0, directory.getAbsolutePath().length()-1);
logPath = logPath + logsSubFolder + “\\”;

// write new ‘stripped’ crawl.log, replacing multiple spaces with a single space in each record..
try {
[/java]

セパレータとしてバックスラッシュを使用しているが、これではWindows環境でしかセパレータとして認識しない。
本来はFile.separator()かFile.separatorChar()で取得すべきである。
これのせいで正常にログ処理ができていないと考えられる。

 Leave a Reply