add autolog

@dwi2, @begeeben  please help to review this patch.
#6