Let caller specify BufferMode for the log file