v0.1.3-0...-08ec195 Latest Latest

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

Go to latest
Published: Jul 12, 2018 License: BSD-4-Clause Imports: 7 Imported by: 0




This section is empty.


This section is empty.


func Close

func Close()

func NewLocked

func NewLocked(ws logger.WriteSyncer) logger.RotateSyncer

Lock wraps a WriteSyncer in a mutex to make it safe for concurrent use. In particular, *os.Files must be locked before use.

func NewLogWriter

func NewLogWriter(FileName string, logDir string, options ...Option) (logger.RotateSyncer, error)

func NewRotater

func NewRotater(filename string, options ...Option) (logger.RotateSyncer, error)

func Rotate

func Rotate()


type LockedWriteSyncer

type LockedWriteSyncer struct {
	// contains filtered or unexported fields

func (*LockedWriteSyncer) Close

func (r *LockedWriteSyncer) Close() (err error)

func (*LockedWriteSyncer) Rotate

func (r *LockedWriteSyncer) Rotate() (err error)

func (*LockedWriteSyncer) SetOnClose

func (r *LockedWriteSyncer) SetOnClose(closeFunc func())

func (*LockedWriteSyncer) Sync

func (s *LockedWriteSyncer) Sync() error

func (*LockedWriteSyncer) Write

func (s *LockedWriteSyncer) Write(bs []byte) (int, error)

type Option

type Option = rotatelogs.Option

type RotateSyncerSet

type RotateSyncerSet struct {
	// contains filtered or unexported fields

* logger set

func (*RotateSyncerSet) Delete

func (s *RotateSyncerSet) Delete(key logger.RotateSyncer)

func (*RotateSyncerSet) Exist

func (s *RotateSyncerSet) Exist(key logger.RotateSyncer) (ok bool)

func (*RotateSyncerSet) Len

func (s *RotateSyncerSet) Len() int

func (*RotateSyncerSet) Range

func (s *RotateSyncerSet) Range(f func(key logger.RotateSyncer))

func (*RotateSyncerSet) SetNx

func (s *RotateSyncerSet) SetNx(key logger.RotateSyncer) bool

func (*RotateSyncerSet) Store

func (s *RotateSyncerSet) Store(key logger.RotateSyncer)

Jump to

Keyboard shortcuts

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