From 5eeb07e1c1cc8514e38cb2a04d7abda3d7b2c877 Mon Sep 17 00:00:00 2001 From: "M. Sz" Date: Wed, 16 Dec 2020 08:56:09 +0100 Subject: [PATCH] changed terminal color separator & changed logLevelNone to logLevelDefault in app.go --- d2app/app.go | 5 +---- d2core/d2term/terminal.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/d2app/app.go b/d2app/app.go index 99110921..f4ae128c 100644 --- a/d2app/app.go +++ b/d2app/app.go @@ -124,7 +124,7 @@ func Create(gitBranch, gitCommit string) *App { app.Logger = d2util.NewLogger() app.Logger.SetPrefix(appLoggerPrefix) - app.Logger.SetLevel(d2util.LogLevelNone) + app.Logger.SetLevel(d2util.LogLevelDefault) return app } @@ -320,9 +320,6 @@ func (a *App) Run() error { } logLevel := *a.Options.LogLevel - if logLevel == d2util.LogLevelUnspecified { - logLevel = a.config.LogLevel - } a.asset.SetLogLevel(logLevel) diff --git a/d2core/d2term/terminal.go b/d2core/d2term/terminal.go index 84477f7c..be345220 100644 --- a/d2core/d2term/terminal.go +++ b/d2core/d2term/terminal.go @@ -352,7 +352,7 @@ func (t *terminal) OutputRaw(text string, category d2enum.TermCategory) { for _, line := range lines { // removes color token (this token ends with [0m ) - l := strings.Split(line, "[0m ") + l := strings.Split(line, "\033[0m") line = l[len(l)-1] t.outputHistory = append(t.outputHistory, termHistoryEntry{line, category})