File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import (
1313
1414 "strconv"
1515
16- "github.com/mattn/go-isatty"
1716 "github.com/valyala/fasttemplate"
1817
1918 "github.com/labstack/gommon/color"
@@ -112,17 +111,21 @@ func (l *Logger) Output() io.Writer {
112111 return l .output
113112}
114113
115- func (l * Logger ) SetHeader (h string ) {
116- l .template = l .newTemplate (h )
117- }
118-
119114func (l * Logger ) SetOutput (w io.Writer ) {
120115 l .output = w
121116 if w , ok := w .(* os.File ); ! ok || ! isatty .IsTerminal (w .Fd ()) {
122117 l .DisableColor ()
123118 }
124119}
125120
121+ func (l * Logger ) Color () * color.Color {
122+ return l .color
123+ }
124+
125+ func (l * Logger ) SetHeader (h string ) {
126+ l .template = l .newTemplate (h )
127+ }
128+
126129func (l * Logger ) Print (i ... interface {}) {
127130 fmt .Fprintln (l .output , i ... )
128131}
You can’t perform that action at this time.
0 commit comments