Write logs to capped collection