Documentation ¶
Index ¶
- func Close()
- func NewLocked(ws logger.WriteSyncer) logger.RotateSyncer
- func NewLogWriter(FileName string, logDir string, options ...Option) (logger.RotateSyncer, error)
- func NewRotater(filename string, options ...Option) (logger.RotateSyncer, error)
- func Rotate()
- type LockedWriteSyncer
- type Option
- type RotateSyncerSet
- func (s *RotateSyncerSet) Delete(key logger.RotateSyncer)
- func (s *RotateSyncerSet) Exist(key logger.RotateSyncer) (ok bool)
- func (s *RotateSyncerSet) Len() int
- func (s *RotateSyncerSet) Range(f func(key logger.RotateSyncer))
- func (s *RotateSyncerSet) SetNx(key logger.RotateSyncer) bool
- func (s *RotateSyncerSet) Store(key logger.RotateSyncer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 NewRotater ¶
func NewRotater(filename string, options ...Option) (logger.RotateSyncer, error)
Types ¶
type LockedWriteSyncer ¶
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
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)
Click to show internal directories.
Click to hide internal directories.