SOLR-6677: Reduced logging during Solr startup, moved more logs to DEBUG level

This commit is contained in:
Jan Høydahl 2016-09-22 17:03:24 +02:00
parent 7377d0ef9e
commit f391d57075
21 changed files with 106 additions and 69 deletions

View File

@ -167,6 +167,8 @@ Other Changes
* SOLR-9544: Allow ObjectReleaseTracker more time to check for asynchronously
closing resources (Alan Woodward)
* SOLR-6677: Reduced logging during Solr startup, moved more logs to DEBUG level (janhoy, Shawn Heisey)
================== 6.2.1 ==================
Bug Fixes

View File

@ -350,7 +350,7 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
CacheValue newCacheValue = new CacheValue(fullPath, directory);
byDirectoryCache.put(directory, newCacheValue);
byPathCache.put(fullPath, newCacheValue);
log.info("return new directory for " + fullPath);
log.debug("return new directory for " + fullPath);
success = true;
} finally {
if (!success) {

View File

@ -51,7 +51,7 @@ public class ConfigSetProperties {
try {
reader = new InputStreamReader(loader.openResource(name), StandardCharsets.UTF_8);
} catch (SolrResourceNotFoundException ex) {
log.info("Did not find ConfigSet properties, assuming default properties: " + ex.getMessage());
log.debug("Did not find ConfigSet properties, assuming default properties: " + ex.getMessage());
return null;
} catch (Exception ex) {
throw new SolrException(ErrorCode.SERVER_ERROR, "Unable to load reader for ConfigSet properties: " + name, ex);

View File

@ -189,7 +189,7 @@ public class CoreContainer {
// private ClientConnectionManager clientConnectionManager = new PoolingClientConnectionManager();
{
log.info("New CoreContainer " + System.identityHashCode(this));
log.debug("New CoreContainer " + System.identityHashCode(this));
}
/**
@ -273,7 +273,7 @@ public class CoreContainer {
// Read and pass the authorization context to the plugin
authorizationPlugin.plugin.init(authorizationConf);
} else {
log.info("Security conf doesn't exist. Skipping setup for authorization module.");
log.debug("Security conf doesn't exist. Skipping setup for authorization module.");
}
this.authorizationPlugin = authorizationPlugin;
if (old != null) {
@ -302,7 +302,7 @@ public class CoreContainer {
log.info("Authentication plugin class obtained from system property '" +
AUTHENTICATION_PLUGIN_PROP + "': " + pluginClassName);
} else {
log.info("No authentication plugin used.");
log.debug("No authentication plugin used.");
}
SecurityPluginHolder<AuthenticationPlugin> old = authenticationPlugin;
SecurityPluginHolder<AuthenticationPlugin> authenticationPlugin = null;
@ -335,7 +335,7 @@ public class CoreContainer {
// The default http client of the core container's shardHandlerFactory has already been created and
// configured using the default httpclient configurer. We need to reconfigure it using the plugin's
// http client configurer to set it up for internode communication.
log.info("Reconfiguring HttpClient settings.");
log.debug("Reconfiguring HttpClient settings.");
SolrHttpClientContextBuilder httpClientBuilder = new SolrHttpClientContextBuilder();
if (builder.getCredentialsProviderProvider() != null) {
@ -431,7 +431,7 @@ public class CoreContainer {
* Load the cores defined for this CoreContainer
*/
public void load() {
log.info("Loading cores into CoreContainer [instanceDir={}]", loader.getInstancePath());
log.debug("Loading cores into CoreContainer [instanceDir={}]", loader.getInstancePath());
// add the sharedLib to the shared resource loader before initializing cfg based plugins
String libDir = cfg.getSharedLibDirectory();
@ -742,14 +742,14 @@ public class CoreContainer {
coreInitFailures.remove(name);
if( old == null || old == core) {
log.info( "registering core: "+name );
log.debug( "registering core: "+name );
if (registerInZk) {
zkSys.registerInZk(core, false);
}
return null;
}
else {
log.info( "replacing core: "+name );
log.debug( "replacing core: "+name );
old.close();
if (registerInZk) {
zkSys.registerInZk(core, false);

View File

@ -35,6 +35,7 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
import com.google.common.collect.Lists;
import org.apache.solr.common.SolrException;
@ -54,7 +55,7 @@ public class CorePropertiesLocator implements CoresLocator {
public CorePropertiesLocator(Path coreDiscoveryRoot) {
this.rootDirectory = coreDiscoveryRoot;
logger.info("Config-defined core root directory: {}", this.rootDirectory);
logger.debug("Config-defined core root directory: {}", this.rootDirectory);
}
@Override
@ -122,7 +123,7 @@ public class CorePropertiesLocator implements CoresLocator {
@Override
public List<CoreDescriptor> discover(final CoreContainer cc) {
logger.info("Looking for core definitions underneath {}", rootDirectory);
logger.debug("Looking for core definitions underneath {}", rootDirectory);
final List<CoreDescriptor> cds = Lists.newArrayList();
try {
Set<FileVisitOption> options = new HashSet<>();
@ -133,7 +134,7 @@ public class CorePropertiesLocator implements CoresLocator {
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (file.getFileName().toString().equals(PROPERTIES_FILENAME)) {
CoreDescriptor cd = buildCoreDescriptor(file, cc);
logger.info("Found core {} in {}", cd.getName(), cd.getInstanceDir());
logger.debug("Found core {} in {}", cd.getName(), cd.getInstanceDir());
cds.add(cd);
return FileVisitResult.SKIP_SIBLINGS;
}
@ -155,7 +156,10 @@ public class CorePropertiesLocator implements CoresLocator {
} catch (IOException e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Couldn't walk file tree under " + this.rootDirectory, e);
}
logger.info("Found {} core definitions", cds.size());
logger.info("Found {} core definitions underneath {}", cds.size(), rootDirectory);
if (cds.size() > 0) {
logger.info("Cores are: {}", cds.stream().map(CoreDescriptor::getName).collect(Collectors.toList()));
}
return cds;
}

View File

@ -73,7 +73,7 @@ import static org.apache.solr.common.params.CommonParams.NAME;
*/
public class JmxMonitoredMap<K, V> extends
ConcurrentHashMap<String, SolrInfoMBean> {
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
// set to true to use cached statistics NamedLists between getMBeanInfo calls to work
// around over calling getStatistics on MBeanInfos when iterating over all attributes (SOLR-6586)
@ -108,11 +108,11 @@ public class JmxMonitoredMap<K, V> extends
}
if (servers == null || servers.isEmpty()) {
LOG.info("No JMX servers found, not exposing Solr information with JMX.");
log.debug("No JMX servers found, not exposing Solr information with JMX.");
return;
}
server = servers.get(0);
LOG.info("JMX monitoring is enabled. Adding Solr mbeans to JMX Server: "
log.info("JMX monitoring is enabled. Adding Solr mbeans to JMX Server: "
+ server);
} else {
try {
@ -122,7 +122,7 @@ public class JmxMonitoredMap<K, V> extends
.newJMXConnectorServer(new JMXServiceURL(jmxConfig.serviceUrl),
null, server);
connector.start();
LOG.info("JMX monitoring is enabled at " + jmxConfig.serviceUrl);
log.info("JMX monitoring is enabled at " + jmxConfig.serviceUrl);
} catch (Exception e) {
// Release the reference
server = null;
@ -145,7 +145,7 @@ public class JmxMonitoredMap<K, V> extends
ObjectName instance = new ObjectName(jmxRootName + ":*");
objectNames = server.queryNames(instance, exp);
} catch (Exception e) {
LOG.warn("Exception querying for mbeans", e);
log.warn("Exception querying for mbeans", e);
}
if (objectNames != null) {
@ -153,7 +153,7 @@ public class JmxMonitoredMap<K, V> extends
try {
server.unregisterMBean(name);
} catch (Exception e) {
LOG.warn("Exception un-registering mbean {}", name, e);
log.warn("Exception un-registering mbean {}", name, e);
}
}
}
@ -181,7 +181,7 @@ public class JmxMonitoredMap<K, V> extends
SolrDynamicMBean mbean = new SolrDynamicMBean(coreHashCode, infoBean, useCachedStatsBetweenGetMBeanInfoCalls);
server.registerMBean(mbean, name);
} catch (Exception e) {
LOG.warn( "Failed to register info bean: " + key, e);
log.warn( "Failed to register info bean: " + key, e);
}
}
@ -201,7 +201,7 @@ public class JmxMonitoredMap<K, V> extends
try {
unregister((String) key, infoBean);
} catch (RuntimeException e) {
LOG.warn( "Failed to unregister info bean: " + key, e);
log.warn( "Failed to unregister info bean: " + key, e);
}
}
return super.remove(key);
@ -319,7 +319,7 @@ public class JmxMonitoredMap<K, V> extends
} catch (Exception e) {
// don't log issue if the core is closing
if (!(SolrException.getRootCause(e) instanceof AlreadyClosedException))
LOG.warn("Could not getStatistics on info bean {}", infoBean.getName(), e);
log.warn("Could not getStatistics on info bean {}", infoBean.getName(), e);
}
MBeanAttributeInfo[] attrInfoArr = attrInfoList
@ -395,7 +395,7 @@ public class JmxMonitoredMap<K, V> extends
try {
list.add(new Attribute(attribute, getAttribute(attribute)));
} catch (Exception e) {
LOG.warn("Could not get attribute " + attribute);
log.warn("Could not get attribute " + attribute);
}
}

View File

@ -29,6 +29,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
@ -116,10 +117,10 @@ public class PluginBag<T> implements AutoCloseable {
PluginHolder<T> createPlugin(PluginInfo info) {
if ("true".equals(String.valueOf(info.attributes.get("runtimeLib")))) {
log.info(" {} : '{}' created with runtimeLib=true ", meta.getCleanTag(), info.name);
log.debug(" {} : '{}' created with runtimeLib=true ", meta.getCleanTag(), info.name);
return new LazyPluginHolder<>(meta, info, core, core.getMemClassLoader());
} else if ("lazy".equals(info.attributes.get("startup")) && meta.options.contains(SolrConfig.PluginOpts.LAZY)) {
log.info("{} : '{}' created with startup=lazy ", meta.getCleanTag(), info.name);
log.debug("{} : '{}' created with startup=lazy ", meta.getCleanTag(), info.name);
return new LazyPluginHolder<T>(meta, info, core, core.getResourceLoader());
} else {
T inst = core.createInstance(info.className, (Class<T>) meta.clazz, meta.getCleanTag(), null, core.getResourceLoader());
@ -228,6 +229,10 @@ public class PluginBag<T> implements AutoCloseable {
PluginHolder<T> old = put(name, o);
if (old != null) log.warn("Multiple entries of {} with name {}", meta.getCleanTag(), name);
}
if (infos.size() > 0) { // Aggregate logging
log.info("[{}] Initialized {} plugins of type {}: {}", solrCore.getName(), infos.size(), meta.getCleanTag(),
infos.stream().map(i -> i.name).collect(Collectors.toList()));
}
for (Map.Entry<String, T> e : defaults.entrySet()) {
if (!contains(e.getKey())) {
put(e.getKey(), new PluginHolder<T>(null, e.getValue()));

View File

@ -86,10 +86,10 @@ public class SchemaCodecFactory extends CodecFactory implements SolrCoreAware {
"Invalid compressionMode: '" + compressionModeStr +
"'. Value must be one of " + Arrays.toString(Mode.values()));
}
log.info("Using compressionMode: " + compressionMode);
log.debug("Using compressionMode: " + compressionMode);
} else {
compressionMode = SOLR_DEFAULT_COMPRESSION_MODE;
log.info("Using default compressionMode: " + compressionMode);
log.debug("Using default compressionMode: " + compressionMode);
}
codec = new Lucene62Codec(compressionMode) {
@Override

View File

@ -228,7 +228,7 @@ public class SolrConfig extends Config implements MapSerializable {
indexConfig = new SolrIndexConfig(this, "indexConfig", null);
booleanQueryMaxClauseCount = getInt("query/maxBooleanClauses", BooleanQuery.getMaxClauseCount());
log.info("Using Lucene MatchVersion: " + luceneMatchVersion);
log.info("Using Lucene MatchVersion: {}", luceneMatchVersion);
// Warn about deprecated / discontinued parameters
// boolToFilterOptimizer has had no effect since 3.1
@ -327,7 +327,7 @@ public class SolrConfig extends Config implements MapSerializable {
}
solrRequestParsers = new SolrRequestParsers(this);
log.info("Loaded SolrConfig: " + name);
log.info("Loaded SolrConfig: {}", name);
}
public static final List<SolrPluginInfo> plugins = ImmutableList.<SolrPluginInfo>builder()
@ -409,7 +409,7 @@ public class SolrConfig extends Config implements MapSerializable {
int version = 0; // will be always 0 for file based resourceLoader
if (in instanceof ZkSolrResourceLoader.ZkByteArrayInputStream) {
version = ((ZkSolrResourceLoader.ZkByteArrayInputStream) in).getStat().getVersion();
log.info("config overlay loaded . version : {} ", version);
log.debug("Config overlay loaded. version : {} ", version);
}
isr = new InputStreamReader(in, StandardCharsets.UTF_8);
Map m = (Map) ObjectBuilder.getVal(new JSONParser(isr));
@ -750,7 +750,7 @@ public class SolrConfig extends Config implements MapSerializable {
NodeList nodes = (NodeList) evaluate("lib", XPathConstants.NODESET);
if (nodes == null || nodes.getLength() == 0) return;
log.info("Adding specified lib dirs to ClassLoader");
log.debug("Adding specified lib dirs to ClassLoader");
SolrResourceLoader loader = getResourceLoader();
List<URL> urls = new ArrayList<>();
@ -931,7 +931,7 @@ public class SolrConfig extends Config implements MapSerializable {
public RequestParams refreshRequestParams() {
requestParams = RequestParams.getFreshRequestParams(getResourceLoader(), requestParams);
log.info("current version of requestparams : {}", requestParams.getZnodeVersion());
log.debug("current version of requestparams : {}", requestParams.getZnodeVersion());
return requestParams;
}

View File

@ -439,11 +439,11 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
if ("firstSearcher".equals(event)) {
SolrEventListener obj = createInitInstance(info, clazz, label, null);
firstSearcherListeners.add(obj);
log.info("[{}] Added SolrEventListener for firstSearcher: [{}]", logid, obj);
log.debug("[{}] Added SolrEventListener for firstSearcher: [{}]", logid, obj);
} else if ("newSearcher".equals(event)) {
SolrEventListener obj = createInitInstance(info, clazz, label, null);
newSearcherListeners.add(obj);
log.info("[{}] Added SolrEventListener for newSearcher: [{}]", logid, obj);
log.debug("[{}] Added SolrEventListener for newSearcher: [{}]", logid, obj);
}
}
}
@ -521,13 +521,13 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
final PluginInfo info = solrConfig.getPluginInfo(DirectoryFactory.class.getName());
final DirectoryFactory dirFactory;
if (info != null) {
log.info(info.className);
log.debug(info.className);
dirFactory = getResourceLoader().newInstance(info.className, DirectoryFactory.class);
// allow DirectoryFactory instances to access the CoreContainer
dirFactory.initCoreContainer(getCoreDescriptor().getCoreContainer());
dirFactory.init(info.initArgs);
} else {
log.info("solr.NRTCachingDirectoryFactory");
log.debug("solr.NRTCachingDirectoryFactory");
dirFactory = new NRTCachingDirectoryFactory();
dirFactory.initCoreContainer(getCoreDescriptor().getCoreContainer());
}
@ -851,7 +851,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
log.debug("Registering JMX bean [{}] from directory factory.", bean.getName());
// Not worried about concurrency, so no reason to use putIfAbsent
if (infoRegistry.containsKey(bean.getName())){
log.info("Ignoring JMX bean [{}] due to name conflict.", bean.getName());
log.debug("Ignoring JMX bean [{}] due to name conflict.", bean.getName());
} else {
infoRegistry.put(bean.getName(), bean);
}
@ -959,7 +959,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
if (config.jmxConfig.enabled) {
return new JmxMonitoredMap<String, SolrInfoMBean>(name, String.valueOf(this.hashCode()), config.jmxConfig);
} else {
log.info("JMX monitoring not detected for core: " + name);
log.debug("JMX monitoring not detected for core: " + name);
return new ConcurrentHashMap<>();
}
}
@ -1074,9 +1074,9 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
if (pluginInfo != null && pluginInfo.className != null && pluginInfo.className.length() > 0) {
cache = createInitInstance(pluginInfo, StatsCache.class, null,
LocalStatsCache.class.getName());
log.info("Using statsCache impl: " + cache.getClass().getName());
log.debug("Using statsCache impl: " + cache.getClass().getName());
} else {
log.info("Using default statsCache cache: " + LocalStatsCache.class.getName());
log.debug("Using default statsCache cache: " + LocalStatsCache.class.getName());
cache = new LocalStatsCache();
}
return cache;
@ -1099,7 +1099,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
def = map.get(null);
}
if (def == null) {
log.info("no updateRequestProcessorChain defined as default, creating implicit default");
log.debug("no updateRequestProcessorChain defined as default, creating implicit default");
// construct the default chain
UpdateRequestProcessorFactory[] factories = new UpdateRequestProcessorFactory[]{
new LogUpdateProcessorFactory(),
@ -1645,7 +1645,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
// but log a message about it to minimize confusion
newestSearcher.incref();
log.info("SolrIndexSearcher has not changed - not re-opening: " + newestSearcher.get().getName());
log.debug("SolrIndexSearcher has not changed - not re-opening: " + newestSearcher.get().getName());
return newestSearcher;
} // ELSE: open a new searcher against the old reader...
@ -2633,7 +2633,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
return false;
}
if (stat.getVersion() > currentVersion) {
log.info(zkPath+" is stale will need an update from {} to {}", currentVersion,stat.getVersion());
log.debug(zkPath+" is stale will need an update from {} to {}", currentVersion,stat.getVersion());
return true;
}
return false;
@ -2654,7 +2654,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable {
final String coreName = getName();
if (myDirFactory != null && myDataDir != null && myIndexDir != null) {
Thread cleanupThread = new Thread(() -> {
log.info("Looking for old index directories to cleanup for core {} in {}", coreName, myDataDir);
log.debug("Looking for old index directories to cleanup for core {} in {}", coreName, myDataDir);
try {
myDirFactory.cleanupOldIndexDirectories(myDataDir, myIndexDir);
} catch (Exception exc) {

View File

@ -41,9 +41,12 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
@ -89,6 +92,8 @@ public class SolrResourceLoader implements ResourceLoader,Closeable
"update.processor.", "util.", "spelling.", "handler.component.", "handler.dataimport.",
"spelling.suggest.", "spelling.suggest.fst.", "rest.schema.analysis.", "security.","handler.admin."
};
private static final java.lang.String SOLR_CORE_NAME = "solr.core.name";
private static Set<String> loggedOnce = new ConcurrentSkipListSet<>();
protected URLClassLoader classLoader;
private final Path instanceDir;
@ -150,10 +155,10 @@ public class SolrResourceLoader implements ResourceLoader,Closeable
public SolrResourceLoader(Path instanceDir, ClassLoader parent, Properties coreProperties) {
if (instanceDir == null) {
this.instanceDir = SolrResourceLoader.locateSolrHome().toAbsolutePath().normalize();
log.info("new SolrResourceLoader for deduced Solr Home: '{}'", this.instanceDir);
log.debug("new SolrResourceLoader for deduced Solr Home: '{}'", this.instanceDir);
} else{
this.instanceDir = instanceDir.toAbsolutePath().normalize();
log.info("new SolrResourceLoader for directory: '{}'", this.instanceDir);
log.debug("new SolrResourceLoader for directory: '{}'", this.instanceDir);
}
if (parent == null)
@ -193,6 +198,12 @@ public class SolrResourceLoader implements ResourceLoader,Closeable
if (newLoader != classLoader) {
this.classLoader = newLoader;
}
log.info("[{}] Added {} libs to classloader, from paths: {}",
getCoreProperties().getProperty(SOLR_CORE_NAME), urls.size(), urls.stream()
.map(u -> u.getPath().substring(0,u.getPath().lastIndexOf("/")))
.sorted()
.distinct()
.collect(Collectors.toList()));
}
/**
@ -232,7 +243,7 @@ public class SolrResourceLoader implements ResourceLoader,Closeable
allURLs.addAll(Arrays.asList(oldLoader.getURLs()));
allURLs.addAll(urls);
for (URL url : urls) {
log.info("Adding '{}' to classloader", url.toString());
log.debug("Adding '{}' to classloader", url.toString());
}
ClassLoader oldParent = oldLoader.getParent();
@ -754,11 +765,11 @@ public class SolrResourceLoader implements ResourceLoader,Closeable
try {
Context c = new InitialContext();
home = (String)c.lookup("java:comp/env/"+project+"/home");
log.info("Using JNDI solr.home: "+home );
logOnceInfo("home_using_jndi", "Using JNDI solr.home: "+home );
} catch (NoInitialContextException e) {
log.info("JNDI not configured for "+project+" (NoInitialContextEx)");
log.debug("JNDI not configured for "+project+" (NoInitialContextEx)");
} catch (NamingException e) {
log.info("No /"+project+"/home in JNDI");
log.debug("No /"+project+"/home in JNDI");
} catch( RuntimeException ex ) {
log.warn("Odd RuntimeException while testing for JNDI: " + ex.getMessage());
}
@ -768,18 +779,26 @@ public class SolrResourceLoader implements ResourceLoader,Closeable
String prop = project + ".solr.home";
home = System.getProperty(prop);
if( home != null ) {
log.info("using system property "+prop+": " + home );
logOnceInfo("home_using_sysprop", "Using system property "+prop+": " + home );
}
}
// if all else fails, try
if( home == null ) {
home = project + '/';
log.info(project + " home defaulted to '" + home + "' (could not find system property or JNDI)");
logOnceInfo("home_default", project + " home defaulted to '" + home + "' (could not find system property or JNDI)");
}
return Paths.get(home);
}
// Logs a message only once per startup
private static void logOnceInfo(String key, String msg) {
if (!loggedOnce.contains(key)) {
loggedOnce.add(key);
log.info(msg);
}
}
/**
* @return the instance path for this resource loader
*/

View File

@ -358,7 +358,7 @@ public class SolrSnapshotMetaDataManager {
* Reads the snapshot meta-data information from the given {@link Directory}.
*/
private synchronized void loadFromSnapshotMetadataFile() throws IOException {
log.info("Loading from snapshot metadata file...");
log.debug("Loading from snapshot metadata file...");
long genLoaded = -1;
IOException ioe = null;
List<String> snapshotFiles = new ArrayList<>();

View File

@ -139,7 +139,7 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.
this.keepAliveTime = getParameter(args, MAX_THREAD_IDLE_TIME, keepAliveTime,sb);
this.queueSize = getParameter(args, INIT_SIZE_OF_QUEUE, queueSize,sb);
this.accessPolicy = getParameter(args, INIT_FAIRNESS_POLICY, accessPolicy,sb);
log.info("created with {}",sb);
log.debug("created with {}",sb);
// magic sysprop to make tests reproducible: set by SolrTestCaseJ4.
String v = System.getProperty("tests.shardhandler.randomSeed");

View File

@ -111,7 +111,7 @@ public class XMLLoader extends ContentStreamLoader {
xsltCacheLifetimeSeconds = XSLT_CACHE_DEFAULT;
if(args != null) {
xsltCacheLifetimeSeconds = args.getInt(XSLT_CACHE_PARAM,XSLT_CACHE_DEFAULT);
log.info("xsltCacheLifetimeSeconds=" + xsltCacheLifetimeSeconds);
log.debug("xsltCacheLifetimeSeconds=" + xsltCacheLifetimeSeconds);
}
return this;
}

View File

@ -127,7 +127,7 @@ public abstract class LogWatcher<E> {
public static LogWatcher newRegisteredLogWatcher(LogWatcherConfig config, SolrResourceLoader loader) {
if (!config.isEnabled()) {
log.info("A LogWatcher is not enabled");
log.debug("A LogWatcher is not enabled");
return null;
}
@ -135,7 +135,7 @@ public abstract class LogWatcher<E> {
if (logWatcher != null) {
if (config.getWatcherSize() > 0) {
log.info("Registering Log Listener [{}]", logWatcher.getName());
log.debug("Registering Log Listener [{}]", logWatcher.getName());
logWatcher.registerListener(config.asListenerConfig());
}
}
@ -150,7 +150,7 @@ public abstract class LogWatcher<E> {
try {
slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr();
log.info("SLF4J impl is " + slf4jImpl);
log.debug("SLF4J impl is " + slf4jImpl);
if (fname == null) {
if ("org.slf4j.impl.Log4jLoggerFactory".equals(slf4jImpl)) {
fname = "Log4j";
@ -168,7 +168,7 @@ public abstract class LogWatcher<E> {
}
if (fname == null) {
log.info("No LogWatcher configured");
log.debug("No LogWatcher configured");
return null;
}

View File

@ -787,7 +787,7 @@ class FileExchangeRateProvider implements ExchangeRateProvider {
InputStream is = null;
Map<String, Map<String, Double>> tmpRates = new HashMap<>();
try {
log.info("Reloading exchange rates from file "+this.currencyConfigFile);
log.debug("Reloading exchange rates from file "+this.currencyConfigFile);
is = loader.openResource(currencyConfigFile);
javax.xml.parsers.DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

View File

@ -537,18 +537,20 @@ public class IndexSchema {
throw new SolrException(ErrorCode.SERVER_ERROR, msg);
}
}
log.info("default search field in schema is "+defaultSearchFieldName);
log.info("[{}] default search field in schema is {}. WARNING: Deprecated, please use 'df' on request instead.",
loader.getCoreProperties().getProperty(SOLR_CORE_NAME), defaultSearchFieldName);
}
// /schema/solrQueryParser/@defaultOperator
expression = stepsToPath(SCHEMA, SOLR_QUERY_PARSER, AT + DEFAULT_OPERATOR);
node = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
if (node==null) {
log.debug("using default query parser operator (OR)");
log.debug("Default query parser operator not set in Schema");
} else {
isExplicitQueryParserDefaultOperator = true;
queryParserDefaultOperator=node.getNodeValue().trim();
log.info("query parser default operator is "+queryParserDefaultOperator);
log.info("[{}] query parser default operator is {}. WARNING: Deprecated, please use 'q.op' on request instead.",
loader.getCoreProperties().getProperty(SOLR_CORE_NAME), queryParserDefaultOperator);
}
// /schema/uniqueKey/text()
@ -577,7 +579,8 @@ public class IndexSchema {
}
uniqueKeyFieldName=uniqueKeyField.getName();
uniqueKeyFieldType=uniqueKeyField.getType();
log.info("unique key field: "+uniqueKeyFieldName);
log.info("[{}] unique key field: {}",
loader.getCoreProperties().getProperty(SOLR_CORE_NAME), uniqueKeyFieldName);
// Unless the uniqueKeyField is marked 'required=false' then make sure it exists
if( Boolean.FALSE != explicitRequiredProp.get( uniqueKeyFieldName ) ) {

View File

@ -139,7 +139,7 @@ public class OpenExchangeRatesOrgProvider implements ExchangeRateProvider {
public boolean reload() throws SolrException {
InputStream ratesJsonStream = null;
try {
log.info("Reloading exchange rates from "+ratesFileLocation);
log.debug("Reloading exchange rates from "+ratesFileLocation);
try {
ratesJsonStream = (new URL(ratesFileLocation)).openStream();
} catch (Exception e) {
@ -172,7 +172,7 @@ public class OpenExchangeRatesOrgProvider implements ExchangeRateProvider {
refreshInterval = 60;
log.warn("Specified refreshInterval was too small. Setting to 60 minutes which is the update rate of openexchangerates.org");
}
log.info("Initialized with rates="+ratesFileLocation+", refreshInterval="+refreshInterval+".");
log.debug("Initialized with rates="+ratesFileLocation+", refreshInterval="+refreshInterval+".");
refreshIntervalSeconds = refreshInterval * 60;
} catch (SolrException e1) {
throw e1;

View File

@ -117,6 +117,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
@Override
public void init(FilterConfig config) throws ServletException
{
log.trace("SolrDispatchFilter.init(): {}", this.getClass().getClassLoader());
String muteConsole = System.getProperty(SOLR_LOG_MUTECONSOLE);
if (muteConsole != null && !Arrays.asList("false","0","off","no").contains(muteConsole.toLowerCase(Locale.ROOT))) {
StartupLoggingUtils.muteConsole();
@ -142,7 +143,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
this.cores = createCoreContainer(solrHome == null ? SolrResourceLoader.locateSolrHome() : Paths.get(solrHome),
extraProperties);
this.httpClient = cores.getUpdateShardHandler().getHttpClient();
log.info("user.dir=" + System.getProperty("user.dir"));
log.debug("user.dir=" + System.getProperty("user.dir"));
}
catch( Throwable t ) {
// catch this so our filter still works
@ -153,7 +154,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
}
}
log.info("SolrDispatchFilter.init() done");
log.trace("SolrDispatchFilter.init() done");
}
/**

View File

@ -72,7 +72,7 @@ public class UpdateShardHandler {
clientParams.set(HttpClientUtil.PROP_MAX_CONNECTIONS, cfg.getMaxUpdateConnections());
clientParams.set(HttpClientUtil.PROP_MAX_CONNECTIONS_PER_HOST, cfg.getMaxUpdateConnectionsPerHost());
}
log.info("Created UpdateShardHandler HTTP client with params: {}", clientParams);
log.debug("Created UpdateShardHandler HTTP client with params: {}", clientParams);
}
public HttpClient getHttpClient() {

View File

@ -19,6 +19,9 @@ log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%
log4j.logger.org.apache.zookeeper=WARN
log4j.logger.org.apache.hadoop=WARN
log4j.logger.org.eclipse.jetty=WARN
log4j.logger.org.eclipse.jetty.server=INFO
log4j.logger.org.eclipse.jetty.server.handler=WARN
# set to INFO to enable infostream log messages
log4j.logger.org.apache.solr.update.LoggingInfoStream=OFF