logconfig

package
v0.0.0-...-cf0bdef Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CommonTargets = commonTargetEnum{
		TargetStdOut: ":stdout",
		TargetStdErr: ":stderr",
		TargetNull:   ":null",
	}

	VerbosityLevel = verbosityLevel{
		Error: -1,
		Warn:  0,
		Info:  1,
		Debug: 2,
		Trace: 3,
	}
)

Functions

func Init

func Init(opts *Options, result *LogInitResult)

func LogLevelFromVerbosityLevel

func LogLevelFromVerbosityLevel(vLevel int) log.Level

Types

type LogInitResult

type LogInitResult struct {
	Enabled   bool
	Filename  string
	Writer    io.Writer
	Logger    *log.Logger
	StdWriter *log.LogWriter
	StdLogger *stdlog.Logger
}

type Options

type Options struct {
	VerbosityLevel   int
	LogFile          string
	FallbackFileName string
	FallbackDir      string
	LoggerMutex      bool

	Rolling         bool
	MaxSize         int // megabytes
	MaxBackups      int
	MaxAge          int // days
	CompressBackups bool
	Humanize        bool
	EnableColor     bool
	StdLogLevel     log.Level
}

func DefaultOptions

func DefaultOptions() Options

Jump to

Keyboard shortcuts

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