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 Package observability provides logging and metrics for the Nexlayer CLI.
Index ¶
- type LogLevel
- type LogOption
- type Logger
- func (l *Logger) Debug(ctx context.Context, format string, args ...interface{})
- func (l *Logger) Error(ctx context.Context, format string, args ...interface{})
- func (l *Logger) Fatal(ctx context.Context, format string, args ...interface{})
- func (l *Logger) Info(ctx context.Context, format string, args ...interface{})
- func (l *Logger) Sync() error
- func (l *Logger) Warn(ctx context.Context, format string, args ...interface{})
- func (l *Logger) WithField(key string, value interface{}) *Logger
- func (l *Logger) WithFields(fields map[string]interface{}) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogOption ¶
type LogOption func(*Logger)
LogOption represents logger configuration options
func WithRotation ¶
WithRotation enables log rotation with specified size and days
type Logger ¶
type Logger struct {
*zap.SugaredLogger
// contains filtered or unexported fields
}
Logger wraps zap logger with CLI-specific methods
func (*Logger) WithFields ¶
WithFields adds multiple fields to the logger
Click to show internal directories.
Click to hide internal directories.