Documentation ¶
Index ¶
Constants ¶
View Source
const LogBufferLength = 4096
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLogS3Writer ¶
type FileLogS3Writer struct { Interrupt chan bool // contains filtered or unexported fields }
This log writer sends output to a file
func StartS3LogWriter ¶
func StartS3LogWriter(uploader *uploader.UploaderPool, info *gen.InstanceInfo, coordinator *RotateCoordinator) (*FileLogS3Writer, error)
func (*FileLogS3Writer) Close ¶
func (w *FileLogS3Writer) Close()
func (*FileLogS3Writer) LogWrite ¶
func (w *FileLogS3Writer) LogWrite(rec *LogRecord)
This is the FileLogS3Writer's output method
type RotateCoordinator ¶
type RotateCoordinator struct { MaxLines int MaxTime time.Duration // contains filtered or unexported fields }
func NewRotateCoordinator ¶
func NewRotateCoordinator(maxLines int, maxTime time.Duration) *RotateCoordinator
func (*RotateCoordinator) TestForRotate ¶
func (r *RotateCoordinator) TestForRotate() bool
Updates the RotateCoordinator and returns true if rotate conditions are met.
func (*RotateCoordinator) Update ¶
func (r *RotateCoordinator) Update()
type UploadLogger ¶
type UploadLogger struct { Uploader *uploader.UploaderPool Logger Logger }
func StartS3Logger ¶
func StartS3Logger( coordinator *RotateCoordinator, info *gen.InstanceInfo, notifier uploader.NotifierHarness, builder uploader.Factory, errorLogger uploader.ErrorNotifierHarness, numWorkers int, ) (*UploadLogger, error)
func (*UploadLogger) Close ¶
func (u *UploadLogger) Close()
func (*UploadLogger) Log ¶
func (u *UploadLogger) Log(arg string)
func (*UploadLogger) Logf ¶
func (u *UploadLogger) Logf(arg0 string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.