mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-05 08:07:51 -05:00
changed terminal color separator & changed logLevelNone to logLevelDefault in app.go
This commit is contained in:
parent
ea3a66c17d
commit
5eeb07e1c1
@ -124,7 +124,7 @@ func Create(gitBranch, gitCommit string) *App {
|
|||||||
|
|
||||||
app.Logger = d2util.NewLogger()
|
app.Logger = d2util.NewLogger()
|
||||||
app.Logger.SetPrefix(appLoggerPrefix)
|
app.Logger.SetPrefix(appLoggerPrefix)
|
||||||
app.Logger.SetLevel(d2util.LogLevelNone)
|
app.Logger.SetLevel(d2util.LogLevelDefault)
|
||||||
|
|
||||||
return app
|
return app
|
||||||
}
|
}
|
||||||
@ -320,9 +320,6 @@ func (a *App) Run() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logLevel := *a.Options.LogLevel
|
logLevel := *a.Options.LogLevel
|
||||||
if logLevel == d2util.LogLevelUnspecified {
|
|
||||||
logLevel = a.config.LogLevel
|
|
||||||
}
|
|
||||||
|
|
||||||
a.asset.SetLogLevel(logLevel)
|
a.asset.SetLogLevel(logLevel)
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ func (t *terminal) OutputRaw(text string, category d2enum.TermCategory) {
|
|||||||
|
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
// removes color token (this token ends with [0m )
|
// removes color token (this token ends with [0m )
|
||||||
l := strings.Split(line, "[0m ")
|
l := strings.Split(line, "\033[0m")
|
||||||
line = l[len(l)-1]
|
line = l[len(l)-1]
|
||||||
|
|
||||||
t.outputHistory = append(t.outputHistory, termHistoryEntry{line, category})
|
t.outputHistory = append(t.outputHistory, termHistoryEntry{line, category})
|
||||||
|
Loading…
Reference in New Issue
Block a user