Versions in this module Expand all Collapse all v2 v2.1.0 Apr 20, 2026 v2.0.0 Apr 20, 2026 Changes in this version + const GitLabLogFormatEnvVar + const GitLabLogLevelEnvVar + const GitLabLogTimezoneEnvVar + func ContentType(ct string) slog.Attr + func CorrelationID(id string) slog.Attr + func DurationS(d time.Duration) slog.Attr + func Error(err error) slog.Attr + func ErrorMessage(msg string) slog.Attr + func ErrorType(errType string) slog.Attr + func FromContext(ctx context.Context) *slog.Logger + func GitLabUserID(id int) slog.Attr + func GitLabUserName(name string) slog.Attr + func HTTPHost(host string) slog.Attr + func HTTPMethod(method string) slog.Attr + func HTTPProto(proto string) slog.Attr + func HTTPReferrer(referrer string) slog.Attr + func HTTPStatusCode(code int) slog.Attr + func HTTPURI(uri string) slog.Attr + func HTTPURL(url string) slog.Attr + func HTTPUserAgent(ua string) slog.Attr + func New() *slog.Logger + func NewWithConfig(cfg *Config) *slog.Logger + func NewWithFile(filePath string, cfg *Config) (*slog.Logger, io.Closer, error) + func RemoteAddr(addr string) slog.Attr + func RemoteIP(ip string) slog.Attr + func TCPAddress(addr string) slog.Attr + func TTFBS(d time.Duration) slog.Attr + func WithLogger(ctx context.Context, logger *slog.Logger) context.Context + func WrittenBytes(n int64) slog.Attr + type Config struct + Clock TimeFunc + Location *time.Location + LogLevel *slog.Level + UseTextFormat bool + Writer io.Writer + type TimeFunc func() time.Time Other modules containing this package gitlab.com/gitlab-org/labkit