Documentation
¶
Index ¶
- func Configure(level, format string, writer io.Writer)
- func ConfigureWithHTTP(level, url, format, stream, username, password, token string)
- func Debug(msg string, keysAndValues ...any)
- func Error(msg string, keysAndValues ...any)
- func Fatal(msg string, keysAndValues ...any)
- func GetLogger() logger.Logger
- func Info(msg string, keysAndValues ...any)
- func Trace(msg string, keysAndValues ...any)
- func Warn(msg string, keysAndValues ...any)
- func With(key string, value any) logger.Logger
- func WithError(err error) logger.Logger
- func WithGroup(group string) logger.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
Configure sets up the logger with the given settings Call this early in your main() function
func ConfigureWithHTTP ¶ added in v0.24.0
func ConfigureWithHTTP(level, url, format, stream, username, password, token string)
ConfigureWithHTTP sets up the logger to send JSON-formatted records to the given HTTP endpoint. When a URL is configured stderr output is suppressed.
Optional authentication:
- username + password: sent as HTTP Basic Auth on every request.
- token: sent as "Authorization: Bearer <token>"; takes precedence over basic auth when both are configured.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.