示例#1
0
文件: engine.go 项目: kjfcpua/robot
// 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 (self *Spider) OpenFileLog(filePath string) *Spider {
	mlog.InitFilelog(true, filePath)
	return self
}
示例#2
0
文件: engine.go 项目: kjfcpua/robot
// OpenFileLogDefault open file log with default file path like "WD/log/log.2014-9-1".
func (self *Spider) OpenFileLogDefault() *Spider {
	mlog.InitFilelog(true, "")
	return self
}
示例#3
0
文件: engine.go 项目: kjfcpua/robot
// The CloseFileLog close file log.
func (self *Spider) CloseFileLog() *Spider {
	mlog.InitFilelog(false, "")
	return self
}