2020-01-04 13:36:39 +00:00
|
|
|
// +build !appengine,!js,!windows,!nacl,!plan9
|
2019-12-31 16:22:28 +00:00
|
|
|
|
|
|
|
package logrus
|
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func checkIfTerminal(w io.Writer) bool {
|
|
|
|
switch v := w.(type) {
|
|
|
|
case *os.File:
|
2020-01-04 13:36:39 +00:00
|
|
|
return isTerminal(int(v.Fd()))
|
2019-12-31 16:22:28 +00:00
|
|
|
default:
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|