fix logging and crash reports on Windows
"-H=windowsgui" disables stdout on Windows, and the io.Multiwriter used
for logging had stdout as it's first entry, which failed and caused
logging and line caching to be skipped. stdout is now removed from
the multiwriter in this situation. Other portion of the issue was
because crash reports had colons in their names, which Windows
doesn't like. Fixes #168.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
//go:build tray
|
||||
// +build tray
|
||||
|
||||
package main
|
||||
@@ -9,7 +10,6 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/getlantern/systray"
|
||||
"github.com/skratchdot/open-golang/open"
|
||||
)
|
||||
|
||||
var TRAY = true
|
||||
@@ -101,7 +101,8 @@ func onReady() {
|
||||
case <-mRestart.ClickedCh:
|
||||
trayRestart()
|
||||
case <-mOpenLogs.ClickedCh:
|
||||
open.Start(logPath)
|
||||
log.Printf("Opening %s\n", logPath)
|
||||
OpenFile(logPath)
|
||||
case <-mQuit.ClickedCh:
|
||||
systray.Quit()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user