Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PRODENG-2780] Disable colourized log output #548

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ require (
github.com/k0sproject/dig v0.3.1
github.com/k0sproject/rig v0.19.0
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/logrusorgru/aurora v2.0.3+incompatible
github.com/mattn/go-isatty v0.0.20
github.com/mattn/go-shellwords v1.0.12
github.com/mitchellh/go-homedir v1.1.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,6 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0=
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/markbates/errx v1.1.0 h1:QDFeR+UP95dO12JgW+tgi2UVfo0V8YBHiUIOaeBPiEI=
Expand Down
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, DisableQuote: 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
Loading