mirror of
https://github.com/cjbassi/gotop.git
synced 2025-04-27 13:48:54 +08:00
Redirect stderr to logfile
This commit is contained in:
parent
5de58c6964
commit
8548428db4
4
main.go
4
main.go
@ -361,8 +361,10 @@ func logging() *os.File {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
defer logging().Close()
|
lf := logging()
|
||||||
|
defer lf.Close()
|
||||||
cliArguments()
|
cliArguments()
|
||||||
|
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
|
termuiColors() // need to do this before initializing widgets so that they can inherit the colors
|
||||||
initWidgets()
|
initWidgets()
|
||||||
widgetColors()
|
widgetColors()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user