Want to log a string message in gateway diagnostic log from client event Script

The reason the code you have is not working is that the Gateway Diagnostic Log only show log entries that occur in the Gateway scope and not from the Client Scope. You can use messaging to send logging information back to the gateway scope for logging following the solution in this forum post. [SOLVED] Logging client scoped events to gateway