Per-message callbacks for logging and the like.