Only listen for keystrokes if there is a controlling terminal.
Don't log if no logger.