Commit bebbfb0f by Amir Aharon

allow null logger

parent 92c60bc4
......@@ -145,9 +145,12 @@ public class IRestServiceHttpImpl extends CommonServices.IRestService implements
@Override
public boolean init() {
boolean stat = true;
if (MicroserviceApp.getsInstance() != null) {
msAppInstance = MicroserviceApp.getsInstance();
logger = msAppInstance.getLogger();
this.appName = msAppInstance.getAppName();
}
switch (getServiceMode()){
case E_CLIENT:
break;
......
......@@ -826,8 +826,10 @@ public class IRestServiceZmqImpl extends CommonServices.IRestService implements
@Override
public boolean init() {
boolean retstat = true;
if (MicroserviceApp.getsInstance() != null) {
this.appName = MicroserviceApp.getsInstance().getAppName();
this.logger = MicroserviceApp.getsInstance().getLogger();
}
switch (getServiceMode()){
case E_CLIENT:
......
......@@ -97,13 +97,13 @@ public class IMsgQServiceZmqImpl extends CommonServices.IMsgQService {
retstat = allocateClient();
break;
case E_SERVER:
retstat = allocateServer();
retstat = (allocateServer() &&
!allWorkersList.isEmpty() &&
allWorkersList.stream().allMatch(CommonServices.IWorker::init));
break;
}
return (retstat &&
!allWorkersList.isEmpty() &&
allWorkersList.stream().allMatch(CommonServices.IWorker::init));
return retstat;
} else {
System.err.println(getClass().getName() + " >> unknown service mode");
retstat = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment