Skip to content

Commit

Permalink
[PRODENG-2780] Disable colourized log output (#534)
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Kuzmin <[email protected]>
  • Loading branch information
nekwar authored Jan 14, 2025
1 parent 239f72e commit a726324
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 57 deletions.
3 changes: 1 addition & 2 deletions pkg/log/formatter_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"io"
"os"
"runtime"
"time"

log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -47,7 +46,7 @@ func (hook *FormatterWriterHook) Levels() []log.Level {
func NewStdoutHook() *FormatterWriterHook {
stdoutHook := &FormatterWriterHook{
Writer: os.Stdout,
Formatter: &log.TextFormatter{DisableTimestamp: true, ForceColors: runtime.GOOS != "windows"},
Formatter: &log.TextFormatter{DisableTimestamp: false, ForceColors: false, DisableColors: true},
LogLevels: []log.Level{
log.InfoLevel,
log.PanicLevel,
Expand Down
4 changes: 1 addition & 3 deletions pkg/phase/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"time"

"github.com/Mirantis/mcc/pkg/analytics"
"github.com/logrusorgru/aurora"
log "github.com/sirupsen/logrus"
event "gopkg.in/segmentio/analytics-go.v3"
)
Expand Down Expand Up @@ -85,8 +84,7 @@ func (m *Manager) Run() error {
}
}

text := aurora.Green("==> Running phase: %s").String()
log.Infof(text, title)
log.Infof("Running phase: %s", title)
start := time.Now()

result := phase.Run()
Expand Down
Loading

0 comments on commit a726324

Please sign in to comment.