mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
Merge pull request #2764 from dgrove727/2447_TikaTextExtractorLogging
2447 tika text extractor logging
This commit is contained in:
commit
b9f9028540
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -25,6 +25,8 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import net.htmlparser.jericho.Attributes;
|
||||
import net.htmlparser.jericho.Config;
|
||||
import static net.htmlparser.jericho.Config.LoggerProvider;
|
||||
import net.htmlparser.jericho.Renderer;
|
||||
import net.htmlparser.jericho.Source;
|
||||
import net.htmlparser.jericho.StartTag;
|
||||
@ -49,6 +51,11 @@ class HtmlTextExtractor extends FileTextExtractor {
|
||||
"text/html", //NON-NLS NON-NLS
|
||||
"text/javascript" //NON-NLS
|
||||
);
|
||||
|
||||
static {
|
||||
// Disable Jericho HTML Parser log messages.
|
||||
Config.LoggerProvider = LoggerProvider.DISABLED;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean isContentTypeSpecific() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2016 Basis Technology Corp.
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -446,7 +446,7 @@ public final class KeywordSearchIngestModule implements FileIngestModule {
|
||||
}
|
||||
|
||||
if (extractor == null) {
|
||||
logger.log(Level.INFO, "No text extractor found for file id:{0}, name: {1}, detected format: {2}", new Object[]{aFile.getId(), aFile.getName(), detectedFormat}); //NON-NLS
|
||||
// No text extractor found.
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -561,7 +561,7 @@ public final class KeywordSearchIngestModule implements FileIngestModule {
|
||||
return;
|
||||
}
|
||||
if (!extractTextAndIndex(aFile, fileType)) {
|
||||
logger.log(Level.WARNING, "Text extractor not found for file. Extracting strings only. File: ''{0}'' (id:{1}).", new Object[]{aFile.getName(), aFile.getId()}); //NON-NLS
|
||||
// Text extractor not found for file. Extract string only.
|
||||
putIngestStatus(jobId, aFile.getId(), IngestStatus.SKIPPED_ERROR_TEXTEXTRACT);
|
||||
} else {
|
||||
putIngestStatus(jobId, aFile.getId(), IngestStatus.TEXT_INGESTED);
|
||||
|
@ -57,7 +57,6 @@ class TikaTextExtractor extends FileTextExtractor {
|
||||
@Override
|
||||
public void logWarning(final String msg, Exception ex) {
|
||||
KeywordSearch.getTikaLogger().log(Level.WARNING, msg, ex);
|
||||
logger.log(Level.WARNING, msg, ex); //NON-NLS }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user