
v1.6.0 full diff: https://github.com/sirupsen/logrus/compare/v1.5.0...v1.6.0 - Add flag to disable quotes in TextFormatter - Revert "fix race conditions on entry" - fixes Deadlock during Entry.Infof after upgrade to v1.5.0 - fixes Deadlock when using WithField inside of hook - fixes Overly-aggressive mutex locks v1.4.1...v1.5.0 full diff: https://github.com/sirupsen/logrus/compare/v1.4.1...v1.5.0 - Ability to DisableHTMLEscape when using the JSON formatter - Support/fixes for go 1.14 - Many many bugfixes Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
12 lines
224 B
Go
12 lines
224 B
Go
package logrus
|
|
|
|
import (
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
// IsTerminal returns true if the given file descriptor is a terminal.
|
|
func isTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
|
|
return err == nil
|
|
}
|