SignalR logs lots of nice stuff to the console log when hubConnection.logging is turned on, but I would like it to go to a remote log instead. I can't see any way to redirect that output to my log besides replacing console.log which I really don't want to do.
Anyone know how?
You can replace $.connection.fn.log which is called for all logging in the JS client:
$.connection.fn.log = function(msg) {
// pipe somewhere else..
}
Note that this log method always gets called, i.e. if you want it to respect the $.connection.hub.logging setting, you have to check for that explicitly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With