Documentation ¶
Index ¶
- Constants
- func Blue(content interface{}) string
- func Bold(content interface{}) string
- func Color(colorName string, content interface{}) string
- func Green(content interface{}) string
- func Magenta(content interface{}) string
- func Parse(format string, props Props, colorize bool) string
- func Red(content interface{}) string
- func Reverse(content interface{}) string
- func Yellow(content interface{}) string
- type Level
- type Logger
- type Props
Constants ¶
View Source
const ( // 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" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Level ¶
type Level uint8
Level defines all possible log levels
func ParseLevel ¶ added in v0.14.0
ParseLevel returns a log.Level based on input string
type Logger ¶
type Logger interface { SetLevel(level Level) SetProperty(key string, value interface{}) Debug(message string) Debugf(message string, props Props) Info(message string) Infof(message string, props Props) Warn(format string) Warnf(message string, props Props) Error(err error) Errorf(message string, props Props) IsEnabled(level Level) bool Write(p []byte) (int, error) New() Logger }
Logger defines the logging interface.
Click to show internal directories.
Click to hide internal directories.