Skip to content
Permalink
Browse files

Redirect stderr to logfile

  • Loading branch information...
cjbassi committed Dec 10, 2018
1 parent 5de58c6 commit 8548428db4b215048c6f91a5cf71da7ff8274676
Showing with 4 additions and 2 deletions.
  1. +4 −2 main.go
@@ -361,9 +361,11 @@ func logging() *os.File {
}

func main() {
defer logging().Close()
lf := logging()
defer lf.Close()
cliArguments()
termuiColors() // need to do this before initializing widgets so that they can inherit the colors
syscall.Dup2(int(lf.Fd()), 2) // redirect stderr to logfile
termuiColors() // need to do this before initializing widgets so that they can inherit the colors
initWidgets()
widgetColors()
help = w.NewHelpMenu()

0 comments on commit 8548428

Please sign in to comment.
You can’t perform that action at this time.