You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
Include verbose logging in your crawler. Make sure that new fields or enum values introduced upstream (e.g. a new country code or sanction program) will cause a warning to be emitted.
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?
Include verbose logging in your crawler.
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?
The text was updated successfully, but these errors were encountered:
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....
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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?
The text was updated successfully, but these errors were encountered: