Discard stdout if not redirected to file
Commit 97bee661
Printf statement at widgets/msgviewer.go#188 introduced
bad formatting in the display if stdout was not being redirected.
This commit is contained in:
parent
e42b95a617
commit
ec0e0f9d75
1
aerc.go
1
aerc.go
|
@ -128,6 +128,7 @@ func main() {
|
||||||
logOut = os.Stdout
|
logOut = os.Stdout
|
||||||
} else {
|
} else {
|
||||||
logOut = ioutil.Discard
|
logOut = ioutil.Discard
|
||||||
|
os.Stdout, _ = os.Open(os.DevNull)
|
||||||
}
|
}
|
||||||
logger = log.New(logOut, "", log.LstdFlags)
|
logger = log.New(logOut, "", log.LstdFlags)
|
||||||
logger.Println("Starting up aerc")
|
logger.Println("Starting up aerc")
|
||||||
|
|
Loading…
Reference in New Issue