Replace for invalid $serverContext->getLogger() invokation with $serverContext->hasLogger()