Code review comment for ~codersquid/snappy-hwe-snaps/+git/wifi-connect:log-settings

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

I have a BIG request.

Currently almost all of our log messages simply use fmt.Println("== ..."). As a result our logs are visually unified and easy to read.

For example:

Mar 14 20:32:31 pi3dev snap[1262]: == wifi-connect: daemon STARTING
Jun 14 15:57:47 pi3dev snap[1262]: == wifi-connect: wifi-ap is UP but has no SSIDS
Jun 14 15:57:55 pi3dev snap[1262]: == wifi-connect: entering MANAGEMENT mode
Jun 14 15:57:57 pi3dev snap[1262]: == wifi-connect: SSID(s) obtained
Jun 14 15:57:58 pi3dev snap[1262]: == wifi-connect: starting wifi-ap
Jun 14 16:11:02 pi3dev snap[1262]: == wifi-connect: SSID(s) obtained
Jun 14 16:11:04 pi3dev snap[1262]: == wifi-connect/RefreshHandler: starting wifi-ap
Jun 14 16:17:50 pi3dev snap[1262]: == wifi-connect/handler: Connecting to astro_garden_2
Jun 14 16:17:58 pi3dev snap[1262]: == wifi-connect: entering OPERATIONAL mode
Jun 14 16:17:58 pi3dev snap[1262]: 2017/06/14 16:17:58 == wifi-connect/server: HTTP Server closing - accept tcp [::]:8080: use of closed network connection
Jun 14 16:18:19 pi3dev snap[1262]: == wifi-connect: entering MANAGEMENT mode
Jun 14 16:18:21 pi3dev snap[1262]: == wifi-connect: SSID(s) obtained
Jun 14 16:18:22 pi3dev snap[1262]: == wifi-connect: starting wifi-ap

The inconsistent one is the HTTP server message, which has a second timestamp due to using log.

I'd like consistency here. Can you change everything to using the log pkg so that we don't postpone work and we don't have to live with increasing inconsistency in the mean time?

review: Needs Fixing

« Back to merge proposal