The problem was that V8 does not allow the context to access the global variables of another Context. Therefore, logger.logThis (this) did not print anything.
This was resolved by setting the security token in a new context:
moduleContext->SetSecurityToken(context->GetSecurityToken());
"" , moduleContext - , script.