Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable socket.io 1.0 debugging?

I've upgraded to socket.io 1.0 which now uses visionmedia/debug

https://i.sstatic.net/AuGoz.png

It shows those messages even after SET DEBUG=-*

like image 498
laggingreflex Avatar asked Apr 02 '26 20:04

laggingreflex


1 Answers

You can set the log level when configuring socket.io (version < .1.0).

Setting it to 0 will only outpout in the console on error. You could also use your own logger and have it disabled.

log level defaults to 3

The amount of detail that the server should output to the logger.

0 - error

1 - warn

2 - info

3 - debug

Socket.io 1.0+

Note that the logger confirmation has changed please see the log differences and it is now using the debug module.

like image 100
GillesC Avatar answered Apr 09 '26 05:04

GillesC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!