CESNET/Nemea-Modules

json_dump.py flushing

Closed this issue · 2 comments

I'm trying to use json_dump.py instead of logger (there's no other way with vportscan aggregator) and I've found that is does not flush messages at all, so I have to wait for a lot of messages to arrive before anything is written to the log file.

Could you add a file.flush() call (optional if necessary) to json_dump.py so that it can be used as a logger?

Resolved in b2ce27d. Flush is called after each record is written. It can be disabled by a program argument.

Thanks