diff options
| author | Paul Buetow <paul@buetow.org> | 2021-07-31 18:20:03 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-07-31 18:20:03 +0300 |
| commit | f46abf36e80a67d13d12dbe4ba8c899026e53961 (patch) | |
| tree | 46b4577f8b26082d0bebed931b8cc5f5f66d1c0f /internal/io | |
| parent | 8a84f9a9f3b48a894ea4e6227d879e701817b883 (diff) | |
more on configurable colors
Diffstat (limited to 'internal/io')
| -rw-r--r-- | internal/io/logger/logger.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/io/logger/logger.go b/internal/io/logger/logger.go index 4254eef..bef5293 100644 --- a/internal/io/logger/logger.go +++ b/internal/io/logger/logger.go @@ -12,7 +12,7 @@ import ( "syscall" "time" - "github.com/mimecast/dtail/internal/color" + "github.com/mimecast/dtail/internal/color/brush" "github.com/mimecast/dtail/internal/config" ) @@ -207,8 +207,8 @@ func write(what, severity, message string) { if Mode.logToStdout { line := fmt.Sprintf("%s|%s|%s|%s\n", what, hostname, severity, message) - if color.Colored { - line = color.Colorfy(line) + if config.Client.TermColorsEnabled { + line = brush.Colorfy(line) } stdoutBufCh <- line @@ -262,8 +262,8 @@ func Raw(message string) { } if Mode.logToStdout { - if color.Colored { - message = color.Colorfy(message) + if config.Client.TermColorsEnabled { + message = brush.Colorfy(message) } stdoutBufCh <- message } |
