Skip to content

Commit

Permalink
feat(log): default message key (#1545)
Browse files Browse the repository at this point in the history
  • Loading branch information
letian0805 authored Oct 13, 2021
1 parent 1e86fae commit 3d23d29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion log/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"os"
)

var DefaultMessageKey = "msg"

// Option is Helper option.
type Option func(*Helper)

Expand All @@ -24,7 +26,7 @@ func WithMessageKey(k string) Option {
// NewHelper new a logger helper.
func NewHelper(logger Logger, opts ...Option) *Helper {
options := &Helper{
msgKey: "msg", // default message key
msgKey: DefaultMessageKey, // default message key
logger: logger,
}
for _, o := range opts {
Expand Down

0 comments on commit 3d23d29

Please sign in to comment.