Documentation ¶ Index ¶ func New(path string) proto.Adapter func NewFile(path string, backups int, fileSize int64) proto.Adapter type Adapter func (a *Adapter) Close() func (a *Adapter) Put(p *proto.Proto) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(path string) proto.Adapter func NewFile ¶ func NewFile(path string, backups int, fileSize int64) proto.Adapter NewFile creates a file adapter. Params path -- the log file path, the parent directory is created if not exist. backups -- the max count of the backup files. fileSize -- the max size of a single log file in bytes, the file is rotated when it reached the size. Types ¶ type Adapter ¶ type Adapter struct { // contains filtered or unexported fields } func (*Adapter) Close ¶ func (a *Adapter) Close() func (*Adapter) Put ¶ func (a *Adapter) Put(p *proto.Proto) Put puts a log protocol to the log queue. Source Files ¶ View all Source files impl.go Click to show internal directories. Click to hide internal directories.