mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f23c00d870
remove unnescessary import aliases, brackets, and so on. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
33 lines
849 B
Go
33 lines
849 B
Go
// These files implement ANSI-aware input and output streams for use by the Docker Windows client.
|
|
// When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create
|
|
// and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls.
|
|
|
|
package windowsconsole // import "github.com/docker/docker/pkg/term/windows"
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"os"
|
|
"sync"
|
|
|
|
"github.com/Azure/go-ansiterm"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
var logger *logrus.Logger
|
|
var initOnce sync.Once
|
|
|
|
func initLogger() {
|
|
initOnce.Do(func() {
|
|
logFile := ioutil.Discard
|
|
|
|
if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" {
|
|
logFile, _ = os.Create("ansiReaderWriter.log")
|
|
}
|
|
|
|
logger = &logrus.Logger{
|
|
Out: logFile,
|
|
Formatter: new(logrus.TextFormatter),
|
|
Level: logrus.DebugLevel,
|
|
}
|
|
})
|
|
}
|