Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLog ¶
type FileLog struct {
// contains filtered or unexported fields
}
FileLog is an io.Writer that appends to a /tmp file and then periodically tails these contents to a given reporter
func NewWithOptions ¶
func NewWithOptions(jobstepID, name string, flushDelay time.Duration, rootDir string) (*FileLog, error)
Same as New() but allows specifying how long to wait between flushing to the reporter, and the root directory for the log file (which has a sensible default if empty).
func (*FileLog) Shutdown ¶
func (f *FileLog) Shutdown()
Shutdown the log, blocking until any remaining contents are sent to the reporter. Write() still goes to the temp file after this is called.
func (*FileLog) StartReporting ¶
Begins reporting the contents of the log (as it is appended to) to the given reporter. Before this, Write() calls only go into the temp file. Should only be called once.
Click to show internal directories.
Click to hide internal directories.