11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

15 Saving and printing output—log filesContents15.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17515.1.1 Starting and closing logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17615.1.2 Appending to an existing log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17815.1.3 Temporarily suspending and resuming logging . . . . . . . . . . . . . . . . . . . . . . . . 17815.2 Placing comments in logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17915.3 Logging only what you type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17915.4 The log-button alternative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18015.5 Printing logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18015.6 Creating multiple log files simultaneously . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18015.1 OverviewStata can record your session into a file called a log file but does not start a log automatically; youmust tell Stata to record your session. By default, the resulting log file contains what you type and whatStata produces in response, recorded in a format called Stata Markup and Control Language (SMCL);see [P] smcl. The file can be printed or converted to ASCII text for incorporation into documents youcreate with your word processor.To start a log:Your session is now being recordedin file filename.smcl.To temporarily stop logging:Temporarily stop:Resume:To stop logging and close the file:You can now print filename.smcl or type:to create filename.log that you canload into your word processor.Alternative ways to start logging:append to an existing log:replace an existing log:Using the GUI:To start a log:To temporarily stop logging:To resume:To stop logging and close the file:To print previous or current log:. log using filename. log off. log on. log close. translate filename.smcl filename.log. log using filename, append. log using filename, replaceclick on the Log buttonclick on the Log button, and choose Suspendclick on the Log button, and choose Resumeclick on the Log button, and choose Closeselect File > View, choose file,right-click on the Viewer, and select PrintAlso, cmdlog will produce logs containing solely what you typed—logs that, although not containingyour results, are sufficient to recreate the session.To start a command-only log:To stop logging and close the file:To recreate your session:. cmdlog using filename. cmdlog close. do filename.txt175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!