mirror of
https://github.com/docker/cli.git
synced 2026-08-24 02:24:17 -05:00
Notable changes: - Add bidirectional `log/slog` integration with a Logrus hook and `slog.Handler`. - Add minimal, composable logging interfaces for individual log levels. - Fix reentrant logging deadlocks and improve concurrency safety around formatters, hooks, and entries. - Fix generic `Log`, `Logf`, `Logln`, and `LogFn` methods unexpectedly panicking at `PanicLevel`. - Allow `Entry.Caller` to be set explicitly and preserved across derived entries. - Improve `TextFormatter` performance and reduce allocations significantly. - Improve common Logger and Entry hot paths and caller-reporting performance. - Update `TextFormatter` handling for `[]byte`, debug/trace colors, and Windows ANSI terminals. - Raise the minimum supported Go version to Go 1.23. - Deprecate `Entry.HasCaller` and `MutexWrap`. release-notes: https://github.com/sirupsen/logrus/releases/tag/v1.10.0 release-notes: https://github.com/sirupsen/logrus/releases/tag/v1.10.1 full diff: https://github.com/sirupsen/logrus/compare/v1.9.4...v1.10.1 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
13 lines
237 B
Go
13 lines
237 B
Go
//go:build (linux || aix || zos) && !tinygo
|
|
|
|
package logrus
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
const ioctlReadTermios = unix.TCGETS
|
|
|
|
func isTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
|
|
return err == nil
|
|
}
|