freedomofpress / securethenews

An automated scanner and web dashboard for tracking TLS deployment across news organizations
https://securethe.news
GNU Affero General Public License v3.0
101 stars 29 forks source link

Use print(flush=True) to log scan progress #379

Open maeve-fpf opened 2 years ago

maeve-fpf commented 2 years ago

When looking at logs of a scan container with kubectl logs or in ELK, nothing is actually printed until the entire scan is done. I believe this is because block buffering is being used and not enough data is printed for force a write. Instead, let's force a flush after each line. We don't have to call .write() for this; we can just use print().