Stata Log Files

I prefer to create new log files every time I (fully) run a Stata script. When I’m writing a script or testing code I might stop logging, but in general it’s wise to keep logs of important runs.

I store my logs in their own directory so that they don’t clog up my code directory (see organization). I title them with the scripts name followed by the date and time.

I prefer to generate a ton of log files. I don’t like to scroll through a log file that has expired code from a month ago. Usually log files are small (in terms of hard drive space) that I don’t worry about deleting them to save space.

I use text log files instead of smcl since I usually code on multiple OS platforms. Feel free to change to .log or .smcl if that’s your preference :).

Here’s a gist.

 
comments powered by Disqus