|
|
@ -16,11 +16,11 @@ var lineCache = linecache.NewLineCache(100)
|
|
|
|
|
|
|
|
|
|
|
|
func logOutput() (closeFunc func()) {
|
|
|
|
func logOutput() (closeFunc func()) {
|
|
|
|
old := os.Stdout
|
|
|
|
old := os.Stdout
|
|
|
|
log.Printf("Logging to \"%s\"", logPath)
|
|
|
|
|
|
|
|
writers := []io.Writer{old, colorStripper{lineCache}}
|
|
|
|
writers := []io.Writer{old, colorStripper{lineCache}}
|
|
|
|
wExit := make(chan bool)
|
|
|
|
wExit := make(chan bool)
|
|
|
|
r, w, _ := os.Pipe()
|
|
|
|
r, w, _ := os.Pipe()
|
|
|
|
if TRAY {
|
|
|
|
if TRAY {
|
|
|
|
|
|
|
|
log.Printf("Logging to \"%s\"", logPath)
|
|
|
|
f, err := os.OpenFile(logPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
|
|
|
|
f, err := os.OpenFile(logPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
closeFunc = func() {}
|
|
|
|
closeFunc = func() {}
|
|
|
|