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
102 stars 25 forks source link

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

Open maeve-fpf opened 3 years ago

maeve-fpf commented 3 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().