logfile /tmp/my-screen.log
Set the time to flush the data written to the file to the minimal value:
CTRL+a:
logfile flush 0
Toggle the logging of the current screen to on:
CTRL+aH
Press the CTRL+aH combination again to toggle the logging of the current screen to off.