log

package module
v0.0.0-...-58b5b89 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Log

log for golang

Documentation

Index

Constants

View Source
const DefaultTimestampFormat = "2006-01-02 15:04:05.000"

Variables

This section is empty.

Functions

func Init

func Init(options ...Option) error

Init initializes the global logger instance

func Logger

func Logger() *logrus.Logger

Logger gets the global logger instance

Types

type NullFormatter

type NullFormatter struct {
}

func (*NullFormatter) Format

func (n *NullFormatter) Format(_ *logrus.Entry) ([]byte, error)

type Option

type Option interface {
	// contains filtered or unexported methods
}

func StandardOption

func StandardOption(env string) Option

StandardOption

func WriteToFileOption

func WriteToFileOption(dir string) Option

WriteToFileOption

type OptionFunc

type OptionFunc func(*logrus.Logger) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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