Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(ctx context.Context, message string)
- func Debugf(ctx context.Context, message string, props dto.Props)
- func Error(ctx context.Context, err error)
- func Errorf(ctx context.Context, message string, props dto.Props)
- func GetProperties(ctx context.Context) dto.Props
- func GetProperty(ctx context.Context, key string) any
- func Info(ctx context.Context, message string)
- func Infof(ctx context.Context, message string, props dto.Props)
- func IsEnabled(level Level) bool
- func Parse(format string, props dto.Props, colorize bool) string
- func Warn(ctx context.Context, message string)
- func Warnf(ctx context.Context, message string, props dto.Props)
- func WithProperties(ctx context.Context, kv dto.Props) context.Context
- func WithProperty(ctx context.Context, key string, value any) context.Context
- type Level
Constants ¶
View Source
const ( // PropertyKeySessionID is the session id of current logger PropertyKeySessionID = "SessionID" // PropertyKeyContextID is the context id of current logger PropertyKeyContextID = "ContextID" // PropertyKeyUserID is the user id of current logger PropertyKeyUserID = "UserID" // PropertyKeyTenantID is the tenant id of current logger PropertyKeyTenantID = "TenantID" // PropertyKeyTag is the tag of current logger PropertyKeyTag = "Tag" )
Variables ¶
View Source
var CurrentLevel = parseLevel(strings.ToUpper(env.Config.Log.Level))
Functions ¶
func WithProperties ¶ added in v0.18.1
Types ¶
Click to show internal directories.
Click to hide internal directories.