proof

package module
v0.0.0-...-3f7ab65 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeDivision = "time"
	SizeDivision = "size"

	ConsoleEncoder = "console"
	JSONEncoder    = "json"
)
View Source
const (
	Minute = "minute"
	Hour   = "hour"
	Day    = "day"
	Month  = "month"
	Year   = "year"
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, args ...zap.Field)

func Debugf

func Debugf(format string, args ...interface{})

func Error

func Error(msg string, args ...zap.Field)

func Errorf

func Errorf(format string, args ...interface{})

func Fatal

func Fatal(msg string, args ...zap.Field)

func Fatalf

func Fatalf(format string, args ...interface{})

func Info

func Info(msg string, args ...zap.Field)

func Infof

func Infof(format string, args ...interface{})

func Render

func Render(k string, v interface{}) zap.Field

func Sync

func Sync() error

func Warn

func Warn(msg string, args ...zap.Field)

func Warnf

func Warnf(format string, args ...interface{})

func With

func With(k string, v interface{}) zap.Field

func WithError

func WithError(err error) zap.Field

func WithJSONByte

func WithJSONByte(k string, v []byte) zap.Field

Types

type Options

type Options struct {
	Encoding      string
	InfoFilename  string
	ErrorFilename string
	MaxSize       int
	MaxBackups    int
	MaxAge        int
	Compress      bool
	Division      string
	LevelSeparate bool
	TimeUnit      TimeUnit
	// contains filtered or unexported fields
}

func New

func New() *Options

func (*Options) CloseConsoleDisplay

func (o *Options) CloseConsoleDisplay()

func (*Options) Run

func (o *Options) Run() *Proof

func (*Options) SetCaller

func (o *Options) SetCaller(b bool)

func (*Options) SetCapitalColor

func (o *Options) SetCapitalColor(b bool)

func (*Options) SetCompress

func (o *Options) SetCompress(b bool)

func (*Options) SetDivision

func (o *Options) SetDivision(division string)

func (*Options) SetEncoding

func (o *Options) SetEncoding(encoding string)

func (*Options) SetErrorFile

func (o *Options) SetErrorFile(path string)

func (*Options) SetInfoFile

func (o *Options) SetInfoFile(path string)

func (*Options) SetMaxAge

func (o *Options) SetMaxAge(a int)

func (*Options) SetMaxBackups

func (o *Options) SetMaxBackups(n int)

func (*Options) SetMaxSize

func (o *Options) SetMaxSize(size int)

func (*Options) SetTimeUnit

func (o *Options) SetTimeUnit(t TimeUnit)

type Proof

type Proof struct {
	Z *zap.Logger
}
var (
	Logger *Proof
)

type TimeUnit

type TimeUnit string

func (TimeUnit) Format

func (t TimeUnit) Format() string

func (TimeUnit) RotationGap

func (t TimeUnit) RotationGap() time.Duration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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