Brewskey / spark-protocol

Node.JS module for hosting direct encrypted CoAP socket connections
GNU Lesser General Public License v3.0
9 stars 16 forks source link

Connected Devices shown can be used as a configuration item. #141

Open jinyangqiao opened 5 years ago

jinyangqiao commented 5 years ago

Hi: when I use my local spark-server,I found that the log below is always show,but I don't wan't to this to be shown so frequently; [2019-02-20T10:59:04.459Z] INFO: DeviceServer.js/15464 on DTIT-YJin: Connected Devices (devices=0, sockets=0) I think this can be used as a configuration item. setInterval( (): void => server.getConnections((error: Error, count: number) => { logger.info( { devices: this._devicesById.size, sockets: count }, 'Connected Devices', ); }), 10000, );

jlkalberer commented 5 years ago

Make a pull request for this. Add a new setting called CONNECTED_DEVICES_LOGGING_INTERVAL.

I'm not going to have time to fix something like this.