Documentation ¶
Index ¶
- Constants
- func Debug(msg string, fields ...zap.Field)
- func Error(msg string, fields ...zap.Field)
- func Fatal(msg string, fields ...zap.Field)
- func Info(msg string, fields ...zap.Field)
- func Panic(msg string, fields ...zap.Field)
- func SetLogger(name string, opts ...Option)
- func TestSetLogger()
- func Warn(msg string, fields ...zap.Field)
- type Option
Constants ¶
View Source
const ( DefaultPath string = "/var/log/k8shuginn/" LogExtension string = ".log" )
View Source
const (
DefaultDir string = "log"
)
Variables ¶
This section is empty.
Functions ¶
func TestSetLogger ¶
func TestSetLogger()
Types ¶
type Option ¶
type Option func(*config)
Option is a function that modifies a configuration
func WithLogCompress ¶
WithLogCompress sets the compression for the log file
func WithLogLevel ¶
WithLogLevel sets the log level for the logger
func WithLogLocalTime ¶
WithLogLocalTime sets the local time for the log file
func WithLogMaxAge ¶
WithLogMaxAge sets the maximum age of the log file
func WithLogMaxBackups ¶
WithLogMaxBackups sets the maximum number of backups for the log file
func WithLogMaxSize ¶
WithLogMaxSize sets the maximum size of the log file
Click to show internal directories.
Click to hide internal directories.