Version: v1.0.0 Latest Latest

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

Go to latest
Published: Mar 18, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0




This section is empty.


This section is empty.


func Close

func Close()

Close will close all registered logger .

func Rotate

func Rotate()

Rotate will rotate all registered logger .


type Option

type Option = rotatelogs.Option

Option is an alias for the rotatelogs.Option

type RotateSyncer

type RotateSyncer interface {
	Rotate() error

RotateSyncer is a WriteSyncer interface with file rotate capability.

func NewLocked

func NewLocked(ws WriteSyncer) RotateSyncer

NewLocked create a writer.

func NewLogWriter

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

NewLogWriter create a RotateSyncer writer for logging.Logger.

func NewNull

func NewNull() RotateSyncer

NewNull create a blackhole writer.

func NewRotater

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

NewRotater create a RotateSyncer writer.

type RotateSyncerSet

type RotateSyncerSet struct {
	// contains filtered or unexported fields

RotateSyncerSet is registry of RotateSyncer

func (*RotateSyncerSet) Delete

func (s *RotateSyncerSet) Delete(key RotateSyncer)

Delete deletes the value for a key.

func (*RotateSyncerSet) Exist

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

Exist returns whether value was found in the map.

func (*RotateSyncerSet) Len

func (s *RotateSyncerSet) Len() int

Len returns sizeof the map.

func (*RotateSyncerSet) Range

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

Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.

func (*RotateSyncerSet) SetNx

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

SetNx returns false value was found in the map. Otherwise, it stores and returns true.

func (*RotateSyncerSet) Store

func (s *RotateSyncerSet) Store(key RotateSyncer)

Store sets the value for a key.

type WriteSyncer

type WriteSyncer interface {
	Sync() error

WriteSyncer is a WriteCloser interface with synchronize capability.

Jump to

Keyboard shortcuts

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