Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is something that can log or replay Ops.
func NewLogger ¶
NewLogger will return a Logger that will dump data into dir, or replay data from dir.
func (*Logger) Clear ¶
func (self *Logger) Clear()
Clear will stop this Logger and remove all snapshots or logfiles older than now.
func (*Logger) Dump ¶
Dump will accept an operation if this Logger is recording, and dump it into a logfile.
func (*Logger) Limit ¶
Limit will limit the size of the last logfile to maxSize bytes. When the last logfile is bigger than maxSize, it will merge the last snapshot and any logfile created after it into a new snapshot, and start a new logfile to continue. All this will happen transparently in a separate goroutine.
func (*Logger) Play ¶
Play will replay the latest snapshot and all logfiles created after it using the provided operate.
func (*Logger) Record ¶
func (self *Logger) Record() (rval chan *logfile)
Record will make this Logger start recording.