Esempio n. 1
0
// Continue reading on an existing file.
// The given file was renamed from another file we know -> The same harvester channel is linked as the old file
// The file param is only used for logging
func (p *ProspectorLog) continueExistingFile(h *harvester.Harvester, previousFile string) {
	logp.Debug("prospector", "Launching harvester on renamed file. File rename was detected: %s -> %s", previousFile, h.Path)

	lastinfo := p.harvesterStats[previousFile]
	h.Stat.Continue(&lastinfo)

	// Update state because of file rotation
	h.UpdateState()
}