Skip to content

Commit

Permalink
fix: print log stack when debug
Browse files Browse the repository at this point in the history
  • Loading branch information
lfbdev committed Mar 10, 2022
1 parent f0c9a01 commit 0edb717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/log/logwrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (m *CliLoggerFormatter) Format(entry *logrus.Entry) ([]byte, error) {

timestamp := entry.Time.Format("2006-01-02 15:04:05")

if m.level == logrus.ErrorLevel {
if m.level == logrus.ErrorLevel && logrus.GetLevel() == logrus.DebugLevel {
entry.Message = addCallStackIgnoreLogrus(entry.Message)
}

Expand Down

0 comments on commit 0edb717

Please sign in to comment.