For this you need to have Putty installed on your computer, it is free and can be downloaded from here. Now you need to adjust some settings in putty before connecting to your device. Open the putty console, under Session click the tab Logging, the default option selected is None, change it to "All session Output" and under Log File Name click the tab Browse and choose a location on your computer, then again click to Session, under session click Default Settings and Save it.