Logiqx / wsw-tech

Technical tasks relating to Weymouth Speed Week
0 stars 0 forks source link

Excessive noise in the server log after Motion disconnect #61

Open Logiqx opened 8 months ago

Logiqx commented 8 months ago

Once a motion has been processed and switched off the server log is a bit busy.

The logs will often look something like this for around 30 second after the disconnection:

2023-10-12 15:23:50,DEBUG,motion-632 detected at 192.168.0.218
2023-10-12 15:23:50,DEBUG,motion-634 detected at 192.168.0.186
2023-10-12 15:23:50,DEBUG,motion-816 detected at 192.168.0.128
2023-10-12 15:23:51,DEBUG,motion-632 not accepting connections
2023-10-12 15:23:51,DEBUG,motion-634 not accepting connections
2023-10-12 15:23:51,DEBUG,motion-816 not accepting connections

This occurs because the DNS within a WiFi router is happy to return the IP address that belonged to the Motion prior to disconnection. The debug messages were useful during development but are sometwhat redundant now.

Consider changing the logging to only report the IP address once an HTTP connection has been established?