In this post, I will show you how to print log files in Stata. A log file is a record of your Results window. It records everything you type, and all textual output in response. All Stata output is processed by the Stata Markup and Control Language (SMCL). This includes log files, which are saved by default as SMCL files.
To print a standard SMCL log file, you need to have the log file open in a Viewer window. Log files are best viewed using Stata’s Viewer. I have previously saved my SMCL log file 200529 - Mylog.smcl under C:/Users/KuaiKuaiWang/Documents/Stata.
There are two ways to open a Viewer window:


Then the text in your log file will be opened in the Viewer window:

You can copy and paste the text between the Viewer and anything else that uses text, such as word processors and text editors. You can even paste into the Command window or the Do-file Editor.
Once the log file is in the Viewer, you can click on the Print button, or select File > Print.
translator query
For further help on the above, you may type the following in the Command window:
help log
help viewer
help translator