Example #1
0
// OpenFileLogDefault open file log with default file path like "WD/log/log.2014-9-1".
func (this *Spider) OpenFileLogDefault() *Spider {
	mlog.InitFilelog(true, "")
	return this
}
Example #2
0
// The CloseFileLog close file log.
func (this *Spider) CloseFileLog() *Spider {
	mlog.InitFilelog(false, "")
	return this
}
Example #3
0
// The OpenFileLog initialize the log path and open log.
// If log is opened, error info or other useful info in spider will be logged in file of the filepath.
// Log command is mlog.LogInst().LogError("info") or mlog.LogInst().LogInfo("info").
// Spider's default log is closed.
// The filepath is absolute path.
func (this *Spider) OpenFileLog(filePath string) *Spider {
	mlog.InitFilelog(true, filePath)
	return this
}