Documentation
¶
Overview ¶
Copyright (c) 2025 Nexlayer. All rights reserved.n// Use of this source code is governed by an MIT-stylen// license that can be found in the LICENSE file.nn
Index ¶
- type LogLevel
- type Logger
- func (l *Logger) Debug(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) Error(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) Info(ctx context.Context, msg string, args ...interface{})
- func (l *Logger) Warn(ctx context.Context, msg string, args ...interface{})
- type LoggerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides structured logging capabilities.
func NewLogger ¶
func NewLogger(level LogLevel, opts ...LoggerOption) *Logger
NewLogger creates a new logger instance.
type LoggerOption ¶
type LoggerOption func(*Logger)
LoggerOption allows configuring the logger with functional options.
func WithRotation ¶
func WithRotation(maxSizeMB int64, maxAgeDays int) LoggerOption
WithRotation enables log rotation with specified max size and age.
Click to show internal directories.
Click to hide internal directories.