log

package module
Version: v0.0.0-...-7c87d2a Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

README

log

go log utils

Documentation

Index

Constants

View Source
const (
	AdaptorConsole = "console"
	AdaptorFile    = "file"
)
View Source
const (
	LevelDebug   = 0
	LevelInfo    = 1
	LevelPrintln = 1
	LevelWarn    = 2
	LevelError   = 3
	LevelFatal   = 4
)

Variables

This section is empty.

Functions

func Error

func Error(msg string)

func Fatal

func Fatal(msg string)

func Info

func Info(msg string)

func SetLogger

func SetLogger(settings ...string)

func Warn

func Warn(msg string)

Types

type ConsoleConfig

type ConsoleConfig struct {
	Level int `json:"level,int"`
}

type FileConfig

type FileConfig struct {
	Filename string `json:"filename"`
	Maxdays  int    `json:"maxdays"`
	Level    int    `json:"level"`
}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(prefix string, setting ...string) (*Logger, error)

func (*Logger) Debug

func (self *Logger) Debug(msg string)

func (*Logger) Error

func (self *Logger) Error(msg string)

func (*Logger) Info

func (self *Logger) Info(msg string)

func (*Logger) Println

func (self *Logger) Println(msg string)

func (*Logger) SetLogger

func (self *Logger) SetLogger(settings ...string)

func (*Logger) Warn

func (self *Logger) Warn(msg string)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL