Doodle3D / doodle3d-firmware

The API of the Doodle3D WiFi box. This can for example talk to print3d, save settings, update the firmware etc.
www.doodle3d.com
GNU General Public License v2.0
13 stars 9 forks source link

Reduce network related logs in info level #52

Closed peteruithoven closed 8 years ago

peteruithoven commented 8 years ago

Currently there are a lot of usually irrelevant logs about network configuration changes included in the info log level, we should try to move a few of those to the verbose loglevel.

Like the reconfiguring...., committing..., reloading..., result reloading component... logs.

Example of opening access point:

02-23 15:49:08 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 15:49:08 [ENTR] (info)   : received request of type POST for network/openap
02-23 15:49:08 [ENTR] (info)   : remote IP/port: 10.0.0.132/59798
02-23 15:49:08 [NTCF] (info)   : network:setStatus: 3 | Creating access point 'Doodle3D-4CC28C'...
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'apnet' (add_noreload)
02-23 15:49:08 [NTCF] (info)   : committing component 'wireless'
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'wwwredir' (add)
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'network' (reload)
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'dnsredir' (add)
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'staticaddr' (add)
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'wifiiface' (add)
02-23 15:49:08 [NTCF] (info)   : reconfiguring component 'dhcppool' (add_noreload)
02-23 15:49:08 [NTCF] (info)   : committing component 'dhcp'
02-23 15:49:08 [NTCF] (info)   : committing component 'network'
02-23 15:49:08 [NTCF] (info)   : committing component 'uhttpd'
02-23 15:49:08 [NTCF] (info)   : reloading component 'dnsmasq'
02-23 15:49:08 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 15:49:08 [ENTR] (info)   : received request of type GET for network/status
02-23 15:49:08 [ENTR] (info)   : remote IP/port: 10.0.0.132/59801
02-23 15:49:08 [NTCF] (info)   : network:getStatus
02-23 15:49:08 [NTCF] (info)   :   result reloading component 'dnsmasq' (cmd: '/etc/init.d/dnsmasq reload'): 

02-23 15:49:08 [NTCF] (info)   : reloading component 'network'

Example connecting to a WiFi network:

02-23 16:01:08 [ENTR] (info)   : received request of type POST for network/associate
02-23 16:01:08 [ENTR] (info)   : remote IP/port: 192.168.5.184/56397
02-23 16:01:08 [NTCF] (info)   : netconfig:associateSsid: Vechtclub XL F1.19, true
02-23 16:01:08 [NTCF] (info)   : network:setStatus: 1 | Connecting...
02-23 16:01:08 [NTWL] (info)   : start wifi scan
02-23 16:01:08 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:08 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:08 [ENTR] (info)   : remote IP/port: 192.168.5.184/56398
02-23 16:01:08 [NTCF] (info)   : network:getStatus
02-23 16:01:08 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:09 [ENTR] (info)   : received request of type GET for info/status
02-23 16:01:09 [ENTR] (info)   : remote IP/port: 192.168.5.184/56398
02-23 16:01:09 [NTWL] (info)   : wifi scan done
02-23 16:01:09 [NTCF] (info)   : reconfiguring component 'wwwredir' (rm)
02-23 16:01:09 [NTCF] (info)   : reconfiguring component 'dnsredir' (rm)
02-23 16:01:09 [NTCF] (info)   : reconfiguring component 'staticaddr' (rm)
02-23 16:01:09 [NTCF] (info)   : reconfiguring component 'wifiiface' (add)
02-23 16:01:09 [NTCF] (info)   : reconfiguring component 'dhcppool' (rm)
02-23 16:01:09 [NTCF] (info)   : committing component 'dhcp'
02-23 16:01:09 [NTCF] (info)   : committing component 'network'
02-23 16:01:09 [NTCF] (info)   : committing component 'uhttpd'
02-23 16:01:09 [NTCF] (info)   : reloading component 'dnsmasq'
02-23 16:01:09 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:10 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:10 [ENTR] (info)   : remote IP/port: 192.168.5.184/56398
02-23 16:01:10 [NTCF] (info)   : network:getStatus
02-23 16:01:10 [NTCF] (info)   :   result reloading component 'dnsmasq' (cmd: '/etc/init.d/dnsmasq reload'): 
02-23 16:01:10 [NTCF] (info)   : reloading component 'network'
02-23 16:01:10 [NTCF] (info)   :   result reloading component 'network' (cmd: '/etc/init.d/network reload'): 

02-23 16:01:10 [NTCF] (info)   : reloading component 'uhttpd'
02-23 16:01:11 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:11 [NTWL] (info)   : wireless device 'wlan0' not found, trying fallback 'radio0'
02-23 16:01:11 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:11 [ENTR] (info)   : remote IP/port: 192.168.5.184/56398
02-23 16:01:11 [NTCF] (info)   : network:getStatus
02-23 16:01:11 [NTCF] (info)   :   result reloading component 'uhttpd' (cmd: '/etc/init.d/uhttpd reload'): 

02-23 16:01:12 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:12 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:12 [ENTR] (info)   : received request of type GET for info/status
02-23 16:01:12 [ENTR] (info)   : remote IP/port: 192.168.5.184/56399
02-23 16:01:12 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:12 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:12 [NTCF] (info)   : network:getStatus
02-23 16:01:13 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:13 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:13 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:14 [NTCF] (info)   : network:getStatus
02-23 16:01:15 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:15 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:15 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:15 [NTCF] (info)   : network:getStatus
02-23 16:01:15 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:15 [ENTR] (info)   : received request of type GET for info/status
02-23 16:01:15 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:16 [NTCF] (info)   : Network associated
02-23 16:01:16 [NTSI] (info)   : signin:setStatus: 2 | signing in
02-23 16:01:16 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:16 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:16 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:16 [NTCF] (info)   : network:getStatus
02-23 16:01:17 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:17 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:17 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:17 [NTCF] (info)   : network:getStatus
02-23 16:01:18 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:18 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:18 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:18 [NTCF] (info)   : network:getStatus
02-23 16:01:18 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:18 [ENTR] (info)   : received request of type GET for info/status
02-23 16:01:18 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:19 [ENTR] (info)   : =======rest api (api debugging)=======
02-23 16:01:19 [ENTR] (info)   : received request of type GET for network/status
02-23 16:01:19 [ENTR] (info)   : remote IP/port: 192.168.5.184/56400
02-23 16:01:19 [NTCF] (info)   : network:getStatus
02-23 16:01:20 [NTSI] (info)   : signin:setStatus: 1 | idle
02-23 16:01:20 [NTCF] (info)   : Signed in
02-23 16:01:20 [NTCF] (info)   : network:setStatus: 2 | Connected
02-23 16:01:20 [ANET] (info)   : associated to wifi: Vechtclub XL F1.19
woutgg commented 8 years ago

Implemented in https://github.com/Doodle3D/doodle3d-firmware/commit/65062207ffe55d44673c83189726ec62d657f5aa.