removed logging of version on bundle start&stop

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer 2016-02-22 19:45:27 +01:00
parent ae4046990f
commit 51d1e95150
2 changed files with 0 additions and 42 deletions

View File

@ -32,22 +32,4 @@ public class OpenHAB {
return versionString;
}
/**
* Returns the current openHAB build id, retrieving the information from the core bundle version.
* If the id is "qualifier", i.e. openHAB is run from within the IDE, it returns an empty string.
*
* @return the openHAB build id or an empty string, if none is avaiable
*/
static public String getBuildId() {
String versionString = FrameworkUtil.getBundle(OpenHAB.class).getVersion().toString();
String buildString = "";
if (StringUtils.countMatches(versionString, ".") == 3) {
buildString = StringUtils.substringAfterLast(versionString, ".");
if (buildString.equals("qualifier")) {
buildString = "";
}
}
return buildString;
}
}

View File

@ -8,16 +8,10 @@
*/
package org.openhab.core.internal;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import org.eclipse.smarthome.model.rule.runtime.RuleEngine;
import org.openhab.core.OpenHAB;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This is the activator of the core openHAB bundle.
@ -28,25 +22,8 @@ import org.slf4j.LoggerFactory;
*/
public class CoreActivator implements BundleActivator {
private static Logger logger = LoggerFactory.getLogger(CoreActivator.class);
@Override
public void start(BundleContext context) throws Exception {
String version = OpenHAB.getVersion();
String buildId = OpenHAB.getBuildId();
if (buildId.equals("")) {
logger.info("openHAB runtime has been started (v{}).", version);
} else {
logger.info("openHAB runtime has been started (v{}, build {}).", version, buildId);
}
if (logger.isDebugEnabled()) {
RuntimeMXBean rb = ManagementFactory.getRuntimeMXBean();
long uptime = rb.getUptime();
logger.debug("Startup took {} ms", uptime);
}
startRuleEngine(context);
}
@ -74,7 +51,6 @@ public class CoreActivator implements BundleActivator {
*/
@Override
public void stop(BundleContext context) throws Exception {
logger.info("openHAB runtime has been terminated.");
}
}