log buffering and metrics reporting