add comments

This commit is contained in:
MaysWind
2020-12-25 23:54:56 +08:00
parent 7d9b3290d8
commit c20cca869a
2 changed files with 18 additions and 1 deletions
+2
View File
@@ -11,11 +11,13 @@ import (
"github.com/mayswind/lab/pkg/utils"
)
// LogFormatter represents a log formatter
type LogFormatter struct {
Prefix string
DisableLevel bool
}
// Format writes to log according to the log entry
func (f *LogFormatter) Format(entry *logrus.Entry) ([]byte, error) {
var b *bytes.Buffer