Techeron / fvlr_api

0 stars 2 forks source link

Improve Logs #13

Open honjes opened 2 months ago

honjes commented 2 months ago

I think the current logs are giving too much uncompressed data. Maybe adding a logging middleware is worth a though. So for example when giving back the scraper information just giving back how many sites were scraped or giving back the cached status in one line.

From

/match/322791
/match/322792
/match/322793
/match/322795
/match/322796
/match/322797
/match/322799
/match/322800
/match/322801
/match/322803
/match/322804
/match/322805
/match/322806
/match/322807
/match/322808
/match/322809
/match/322810
/match/322811
/match/322812
/match/322813
/match/322814
/match/322815
/match/322816
/match/322817
/match/322818
/match/322819
/match/322820
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response
Cached Response

to

<-- GET /event/2013/matches
    requested 30 site
--> GET /event/2013/matches 200 {maybe time request took} | Cached

the loged response is taken from Hono Docs

christopherime commented 2 months ago

Common log format should be adopted so that will be still human readable or output in json format for easier parsing with external tool