Open jbothma opened 1 year ago
I think the first paragraph refers to the general idea of making crawlers as brittle as possible: if something unexpected happens, it is much better for the crawler to complain and crash than for it to gloss over the issue. In particular, any log message with a level >= WARN will be stored to the database and we can review it later. So having check points like these is really useful:
Regarding the "verbose" logging: any error message below level info
is hidden by default (in practice: log.debug
), but you can make them visible by calling opensanctions
with the -v
flag. That gets super super verbose, though, and to be very honest I do a lot of print()
debugging once I know there's an issue....
One way to read this is that to log new countries or sanction programs, a crawler should query for existing countries or programs and log when new ones are being added. Is that right? If so, the Context could be doing that for you., right?
Also, should the reader take the following to mean generally too?
I'm guessing you don't mean you want log statements like this:
But I do see things that are probably interesting for a given scraper, like which pages are being fetched. And perhaps logging some data that can't be parsed correctly. Is that more the intent of this?