Creating a logger

Flushing log messages in the buffers.
This is explicitly called from your program.
Probably, one second and 10 seconds is proper to stdout and
log files, respectively.
See the source code of withStdoutLogger.