logger.debug("detected language from the email header. {language='"+lang+"'}");
} else {
logger.debug("email did not contain language header field. analyzing text to determine language.");
if (languageIdentifier==null)
languageIdentifier= new LanguageIdentifier();
lang = languageIdentifier.identify(detectReader);
}
} catch (Exception e) {
logger.debug("exception occurred while detecting indexing language.",e);