mirror of https://github.com/apache/lucene.git
SOLR-9548: Print full solr-impl version for SNAPSHOT builds
This commit is contained in:
parent
208e2bc66f
commit
c1553c20f0
|
@ -167,12 +167,22 @@ public class SolrDispatchFilter extends BaseSolrFilter {
|
|||
}
|
||||
|
||||
private void logWelcomeBanner() {
|
||||
log.info(" ___ _ Welcome to Apache Solr™ version {}", Version.LATEST);
|
||||
log.info(" ___ _ Welcome to Apache Solr™ version {}", solrVersion());
|
||||
log.info("/ __| ___| |_ _ Starting in {} mode on port {}", isCloudMode() ? "cloud" : "standalone", getSolrPort());
|
||||
log.info("\\__ \\/ _ \\ | '_| Install dir: {}", System.getProperty("solr.install.dir"));
|
||||
log.info("|___/\\___/_|_| Start time: {}", Instant.now().toString());
|
||||
}
|
||||
|
||||
private String solrVersion() {
|
||||
String specVer = Version.LATEST.toString();
|
||||
try {
|
||||
String implVer = SolrCore.class.getPackage().getImplementationVersion();
|
||||
return (specVer.equals(implVer.split(" ")[0])) ? specVer : implVer;
|
||||
} catch (Exception e) {
|
||||
return specVer;
|
||||
}
|
||||
}
|
||||
|
||||
private String getSolrPort() {
|
||||
return System.getProperty("jetty.port");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue