Documentation
¶
Index ¶
Constants ¶
View Source
const ( LogLevelDebug = slog.LevelDebug LogLevelInfo = slog.LevelInfo LogLevelWarn = slog.LevelWarn LogLevelError = slog.LevelError )
View Source
const ( KEY_TIMESTAMP = "@ts" KEY_LEVEL = "@lv" KEY_MESSAGE = "@msg" KEY_SOURCE = "@src" )
View Source
const ( BadKey = "!BADKEY" MissingValue = "!MISSINGVALUE" )
View Source
const MASKED = "--masked--"
View Source
const TIME_FORMAT = "20060102-150405.000"
Variables ¶
This section is empty.
Functions ¶
func NawStdLogger ¶ added in v0.2.6
func SetLogFormat ¶
func SetLogFormat(f LogFormat)
func SetLogLevel ¶
func SetLogLevel(lv LogLevel)
Types ¶
type LogLevel ¶
func GetLogLevel ¶ added in v0.2.6
func GetLogLevel() LogLevel
type Logger ¶
type Logger interface {
WithGroup(string) Logger
With(...any) Logger
LogIfEnabled(ctx context.Context, lv LogLevel, msg string)
}
func StdDiscardLogger ¶
func ZapDiscardLogger ¶
type SecurityStringer ¶ added in v0.2.6
type SecurityStringer interface {
SecurityString() string
}
Click to show internal directories.
Click to hide internal directories.