log data in and out