added buffering support to logger