Mechanism for sending js log to server file