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().
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 useprint()
.