adapter

package
v0.0.0-...-5157df0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxSize = 100 * MB
	DefaultBackup  = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Write(b []byte) error
	Close()
}

type AdapterConsole

type AdapterConsole struct{}

func (*AdapterConsole) Close

func (ac *AdapterConsole) Close()

func (*AdapterConsole) Write

func (ac *AdapterConsole) Write(b []byte) error

type AdapterFile

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

func NewAdapterFile

func NewAdapterFile(logName string, opt *Options) (*AdapterFile, error)

func (*AdapterFile) Close

func (af *AdapterFile) Close()

func (*AdapterFile) Write

func (af *AdapterFile) Write(b []byte) error

type AdapterNet

type AdapterNet struct{}

func (*AdapterNet) Close

func (an *AdapterNet) Close()

func (*AdapterNet) Write

func (an *AdapterNet) Write(b []byte) error

type ByteSize

type ByteSize int64

日志大小

const (
	KB ByteSize
	MB
	GB
	TB
	PB
)

type Options

type Options struct {
	MaxSize   ByteSize
	MaxBackup int
}

日志选项

Jump to

Keyboard shortcuts

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