magnusmanske / petscan_rs

The repo for the PetScan tool
https://petscan.wmflabs.org/
GNU General Public License v3.0
43 stars 10 forks source link

An option to enable logging http requests and responses #150

Open maximmasiutin opened 6 months ago

maximmasiutin commented 6 months ago

I am trying to install PetScan on my instance, but it always gives an error "No result for source categories". I don't see what happens behind the scene. Please consider adding an option to enable logging http requests and responses, so that we could see the source of errors.

1-Byte commented 6 months ago

In #153 I propose to start using tracing to ease debugging. It could be extended to log results of HTTP requests as well.

maximmasiutin commented 5 months ago

I used the latest version of petscan_rs sources from the repository, and now I'm getting proper error messages, such as:

2024-01-24T08:51:56.772295Z ERROR run:get_wiki_db_connection{wiki="enwiki"}: petscan_rs::app_state: error=Io(Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }))
2024-01-24T08:51:56.772437Z  INFO run: petscan_rs::platform: error=Io(Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }))
Platform::get_response: No result