Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Redirect stderr to logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbassi committed Dec 10, 2018
1 parent 5de58c6 commit 8548428
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Expand Up @@ -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()
Expand Down

0 comments on commit 8548428

Please sign in to comment.