newlog

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

func Error

func Error(format string, v ...interface{})

func Fatal

func Fatal(format string, v ...interface{})

func Info

func Info(format string, v ...interface{})

func SetConfig

func SetConfig(logConfig *LogConfig)

func Warn

func Warn(format string, v ...interface{})

Types

type LogConfig

type LogConfig struct {
	Path      string `json:"path" yaml:"path"`
	Level     string `json:"level" yaml:"level"`
	MaxSize   int    `json:"max_size" yaml:"max_size"`
	MaxBackup int    `json:"max_backup" yaml:"max_backup"`
}

type LogLevel

type LogLevel int
const (
	LevelError LogLevel = iota
	LevelWarn
	LevelInfo
	LevelDebug
)

Jump to

Keyboard shortcuts

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