summaryrefslogtreecommitdiff
path: root/internal/config/client.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-08-10 12:05:40 +0300
committerPaul Buetow <paul@buetow.org>2021-08-10 12:05:40 +0300
commitf3e08046badcbc852a6875b5553ee0a648021552 (patch)
treefad12e3a3062d3a1f30b910e40a3dde02d87168d /internal/config/client.go
parent03ec9f8fc1b30d0efb60584c90a027ff5816d153 (diff)
can compile with new color codes
Diffstat (limited to 'internal/config/client.go')
-rw-r--r--internal/config/client.go108
1 files changed, 85 insertions, 23 deletions
diff --git a/internal/config/client.go b/internal/config/client.go
index d6d106f..84ad037 100644
--- a/internal/config/client.go
+++ b/internal/config/client.go
@@ -4,18 +4,49 @@ import "github.com/mimecast/dtail/internal/color"
// ClientColorConfig allows to override the default terminal color color.
type termColors struct {
- RemoteTextFg color.Color
- RemoteStatsOkBg color.Color
- RemoteStatsWarnBg color.Color
- RemoteTraceBg color.Color
- RemoteDebugBg color.Color
- RemoteWarnBg color.Color
- RemoteErrorBg color.Color
- RemoteFatalBg color.Color
- RemoteFatalAttr color.Attribute
- ClientStatsBg color.Color
- ClientWarnFg color.Color
- ClientErrorFg color.Color
+ ClientErrorAttr color.Attribute
+ ClientErrorBg color.BgColor
+ ClientErrorFg color.FgColor
+
+ ClientStatsAttr color.Attribute
+ ClientStatsBg color.BgColor
+ ClientStatsFg color.FgColor
+
+ ClientWarnAttr color.Attribute
+ ClientWarnBg color.BgColor
+ ClientWarnFg color.FgColor
+
+ RemoteDebugAttr color.Attribute
+ RemoteDebugBg color.BgColor
+ RemoteDebugFg color.FgColor
+
+ RemoteErrorAttr color.Attribute
+ RemoteErrorBg color.BgColor
+ RemoteErrorFg color.FgColor
+
+ RemoteFatalAttr color.Attribute
+ RemoteFatalBg color.BgColor
+ RemoteFatalFg color.FgColor
+
+ RemoteStatsOkAttr color.Attribute
+ RemoteStatsOkBg color.BgColor
+ RemoteStatsOkFg color.FgColor
+
+ RemoteStatsWarnAttr color.Attribute
+ RemoteStatsWarnBg color.BgColor
+ RemoteStatsWarnFg color.FgColor
+
+ RemoteTextAttr color.Attribute
+ RemoteTextBg color.BgColor
+ RemoteTextFg color.FgColor
+
+ RemoteTraceAttr color.Attribute
+ RemoteTraceBg color.BgColor
+ RemoteTraceFg color.FgColor
+
+ RemoteWarnAttr color.Attribute
+ RemoteWarnBg color.BgColor
+ RemoteWarnFg color.FgColor
}
// ClientConfig represents a DTail client configuration (empty as of now as there
@@ -30,18 +61,49 @@ func newDefaultClientConfig() *ClientConfig {
return &ClientConfig{
TermColorsEnabled: true,
TermColors: termColors{
- RemoteTextFg: color.LightGray,
+ ClientErrorAttr: color.AttrBold,
+ ClientErrorBg: color.BgBlack,
+ ClientErrorFg: color.FgRed,
+
+ ClientStatsAttr: color.AttrDim,
+ ClientStatsBg: color.BgBlue,
+ ClientStatsFg: color.FgWhite,
+
+ ClientWarnAttr: color.AttrNone,
+ ClientWarnBg: color.BgBlack,
+ ClientWarnFg: color.FgMagenta,
+
+ RemoteDebugAttr: color.AttrNone,
+ RemoteDebugBg: color.BgGreen,
+ RemoteDebugFg: color.FgWhite,
+
+ RemoteErrorAttr: color.AttrBold,
+ RemoteErrorBg: color.BgRed,
+ RemoteErrorFg: color.FgWhite,
+
+ RemoteFatalAttr: color.AttrBlink,
+ RemoteFatalBg: color.BgRed,
+ RemoteFatalFg: color.FgBlue,
+
+ RemoteStatsOkAttr: color.AttrNone,
RemoteStatsOkBg: color.BgGreen,
- RemoteStatsWarnBg: color.BgRed,
- RemoteTraceBg: color.BgYellow,
- RemoteDebugBg: color.BgYellow,
- RemoteWarnBg: color.BgYellow,
- RemoteErrorBg: color.BgRed,
- RemoteFatalBg: color.BgRed,
- RemoteFatalAttr: color.Bold,
- ClientStatsBg: color.BgBlue,
- ClientWarnFg: color.Purple,
- ClientErrorFg: color.BgRed,
+ RemoteStatsOkFg: color.FgWhite,
+
+ RemoteStatsWarnAttr: color.AttrNone,
+ RemoteStatsWarnBg: color.BgRed,
+ RemoteStatsWarnFg: color.FgWhite,
+
+ RemoteTextAttr: color.AttrNone,
+ RemoteTextBg: color.BgBlack,
+ RemoteTextFg: color.FgWhite,
+
+ RemoteTraceAttr: color.AttrBold,
+ RemoteTraceBg: color.BgGreen,
+ RemoteTraceFg: color.FgWhite,
+
+ RemoteWarnAttr: color.AttrBold,
+ RemoteWarnBg: color.BgYellow,
+ RemoteWarnFg: color.FgWhite,
},
}
}