help newlog

Title

newlog -- Closes the current output log and opens a new log

Syntax

newlog [logfilename]

Description

newlog closes the current output log, if any, and opens a new
log. If the newlog command includes a logfilename,
it is used. Otherwise, the name of the current output log, if any,
is used. Otherwise, the name is "c:\stata.log" (text format).

Remarks

If you specify a logfilename with the .log extension,
it will be in text format; with any other extension it
will be in SMCL format (see help for smcl).

A logfile in SMCL format can only be displayed in the Viewer. A logfile
in text format can be read in the Viewer,
and in any text editor or word processor.

The intended use is described in more detail in
An Introduction to Stata for Health Researchers
(Juul 2006, section 1.7).

Examples

. newlog

. newlog out

. newlog "c:\tmp\out.txt"

. newlog out.log

Author

Svend Juul, Department of Epidemiology,
Institute of Public Health, University of Aarhus, Denmark.

References

Juul, S. 2006.
An Introduction to Stata for Health Researchers.
College Station, TX: Stata Press.

Also see

Manual: [U] 15 Printing and preserving output. [R] log

Online: help for log