Fix LogContext to function for cross-domain calls