diff --git a/print.go b/print.go index 8dfefc0..18120f6 100644 --- a/print.go +++ b/print.go @@ -69,12 +69,14 @@ func print(logLevel logLevel, message string, timestamp int64, extras ...string) formatted = strings.ReplaceAll(formatted, PLACEHOLDER_MESSAGE, message) if len(extras) == 0 { formatted = strings.ReplaceAll(formatted, GetExtrasFormat(), "") + formatted = strings.TrimSpace(formatted) } else { format := GetExtrasFormat() formatted = strings.ReplaceAll(formatted, format, strings.ReplaceAll(format, PLACEHOLDER_EXTRAS, strings.Join(extras, GetExtrasSeparator()))) } if timestamp <= 0 { formatted = strings.ReplaceAll(formatted, GetTimediffFormat(), "") + formatted = strings.TrimSpace(formatted) } else { format := GetTimediffFormat() formatted = strings.ReplaceAll(formatted, format, strings.ReplaceAll(format, PLACEHOLDER_TIMEDIFF, strconv.FormatInt(now.UnixMilli()-timestamp, 10)+"ms"))