Log annotation in database