logging

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config, serviceID, serviceName, serviceVersion string) (*zap.Logger, func() error, error)

func NewKratosLogger

func NewKratosLogger(base *zap.Logger) kratoslog.Logger

func NewNPanelWriter

func NewNPanelWriter(base *zap.Logger) npanellog.Writer

Types

type Config

type Config struct {
	Level          string `json:"level" yaml:"level"`
	Path           string `json:"path" yaml:"path"`
	Format         string `json:"format" yaml:"format"`
	DisableConsole bool   `json:"disable_console" yaml:"disable_console"`
	MaxSizeMB      int    `json:"max_size_mb" yaml:"max_size_mb"`
	MaxBackups     int    `json:"max_backups" yaml:"max_backups"`
	MaxAgeDays     int    `json:"max_age_days" yaml:"max_age_days"`
	Compress       bool   `json:"compress" yaml:"compress"`
}

func DefaultConfig

func DefaultConfig(serviceName string) Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL