migrate boblight to new logger and make it start/stoppable during runtime (#62)

This commit is contained in:
redPanther
2016-06-27 22:43:43 +02:00
committed by brindosch
parent 96037da1cf
commit 809ab82524
5 changed files with 88 additions and 31 deletions

View File

@@ -231,13 +231,15 @@ void HyperionDaemon::startNetworkServices()
if (_config.isMember("boblightServer"))
{
const Json::Value & boblightServerConfig = _config["boblightServer"];
_boblightServer = new BoblightServer(
boblightServerConfig.get("priority",900).asInt(),
boblightServerConfig["port"].asUInt()
);
Debug(_log, "Boblight server created");
if ( boblightServerConfig.get("enable", true).asBool() )
{
_boblightServer = new BoblightServer(
boblightServerConfig.get("priority",900).asInt(),
boblightServerConfig["port"].asUInt()
);
Info(_log, "Boblight server created and started on port %d", _boblightServer->getPort());
_boblightServer->start();
}
}
@@ -252,11 +254,10 @@ void HyperionDaemon::startNetworkServices()
udpListenerConfig.get("port", 2801).asUInt(),
udpListenerConfig.get("shared", false).asBool()
);
Info(_log, "UDP listener created on port %d", _udpListener->getPort());
Debug(_log, "UDP listener created");
if ( udpListenerConfig.get("enable", true).asBool() )
{
Info(_log, "UDP listener started" );
_udpListener->start();
}
}