changed terminal color separator & changed logLevelNone to logLevelDefault in app.go

This commit is contained in:
M. Sz 2020-12-16 08:56:09 +01:00
parent ea3a66c17d
commit 5eeb07e1c1
2 changed files with 2 additions and 5 deletions

View File

@ -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)

View File

@ -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})