jculvey / roboto

A web crawler/scraper/spider for nodejs
67 stars 24 forks source link

Provide external logger #19

Open bijoor opened 8 years ago

bijoor commented 8 years ago

Would like a way for roboto to use the logger provided by the contained application.

Possible approach (not tested):

  1. Add an option customLogger (or something like that)
  2. In constructor add this._log = this.option.customLogger || log;
  3. Replace all log.* with this._log.*
  4. Add a parameter to itemLogger constructor to accept external log object itemLogger(this._log)

Thanks for some awesome code BTW!