Change order of trace source in error log (#7599)

Change the order of trace source that gets
printed on the console.
This commit is contained in:
kannappanr 2019-04-29 14:56:30 -07:00 committed by Harshavardhana
parent ba76cd3268
commit a436f2baa5

View File

@ -45,12 +45,13 @@ func (c *Target) Send(e interface{}) error {
return nil
}
trace := make([]string, len(entry.Trace.Source))
traceLength := len(entry.Trace.Source)
trace := make([]string, traceLength)
// Add a sequence number and formatting for each stack trace
// No formatting is required for the first entry
for i, element := range entry.Trace.Source {
trace[i] = fmt.Sprintf("%8v: %s", i+1, element)
trace[i] = fmt.Sprintf("%8v: %s", traceLength-i, element)
}
tagString := ""