Stata Log

-log- wraps logging facilities.


Usage

log using "path/to/file"
log close

Stata's rich log format uses the .smcl file extension.

If the text option is specified, or if the file extension is one of .log or .txt, then a plaintext log will instead be created.

Temporarily Disabling Logging

Some output should not be recorded. Try:

log off
display "Rather than running commands quietly, temporarily turn off logging.
log on


Stored Results

-log- stores the following details:

log query _all stores the number of open logs in r(numlogs). For each open log, it stores the above details as e.g. r(name1), r(name2), and so on.


See also

Stata manual for -log-

Stata manual chapter 15: Saving and printing output-log files


CategoryRicottone

Stata/Log (last edited 2025-10-24 17:27:01 by DominicRicottone)