adds option to replace buffer in logged objects