Skip to content

Commit eb72f4c

Browse files
committed
Add logging to find out what's going wrong
1 parent 0003df7 commit eb72f4c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

hub.go

+2
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ func checkCmd(m []byte) {
197197
} else if strings.HasPrefix(sl, "broadcast") {
198198
go broadcast(s)
199199
} else if strings.HasPrefix(sl, "restart") {
200+
log.Println("Received restart from the daemon. Why? Boh")
200201
restart("")
201202
} else if strings.HasPrefix(sl, "exit") {
202203
exit()
@@ -266,6 +267,7 @@ func exit() {
266267
}
267268

268269
func restart(path string) {
270+
log.Println("called restart", path)
269271
// relaunch ourself and exit
270272
// the relaunch works because we pass a cmdline in
271273
// that has serial-port-json-server only initialize 5 seconds later

trayicon.go

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ func addRebootTrayElement() {
5555
<-reboot_tray.ClickedCh
5656
systray.Quit()
5757
log.Println("Restarting now...")
58+
log.Println("Restart because addReebotTrayElement")
5859
restart("")
5960
}()
6061
}
@@ -78,6 +79,7 @@ func setupSysTrayReal() {
7879
}
7980
systray.Quit()
8081
*hibernate = true
82+
log.Println("Restart becayse setup went wrong?")
8183
restart("")
8284
}()
8385

@@ -113,6 +115,7 @@ func setupSysTrayHibernate() {
113115
go func() {
114116
<-mOpen.ClickedCh
115117
*hibernate = false
118+
log.Println("Restart for hubernation")
116119
restart("")
117120
}()
118121

update.go

+2
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,8 @@ func (u *Updater) update() error {
325325
//shutil.CopyFile(*configIni, *configIni+".bak", false)
326326
//os.Remove(*configIni)
327327

328+
log.Println("Restarting because update!")
329+
328330
restart(path)
329331
//addRebootTrayElement()
330332

0 commit comments

Comments
 (0)