with_logging sample.