Added a flush() function to netlog listener.