コード例 #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
}