// 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 }
// 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 }
// The CloseFileLog close file log. func (self *Spider) CloseFileLog() *Spider { mlog.InitFilelog(false, "") return self }