Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Notes on each day's log file?


From   Ian Watson <[email protected]>
To   [email protected]
Subject   Re: st: Notes on each day's log file?
Date   Mon, 22 Jan 2007 09:25:34 -0800

Rachel,

I have a simple system which meets this need for me and it's based on
project log files.

I have a d:\data directory (in which Stata opens) and I just issue a

lg wages

or

lg migrants

or whatever, whenever I get started in Stata. This command both changes
to the appropriate subdirectory (eg. d:\data\wages) where that project
lives, opens its log file and appends the sessions results to it, date
and time stamping them.

This means that over time, I have a set of project-specific log files,
but with each session's work clearly defined.

You might like to modify this approach if you don't want
project-specific log files.  The ado file -lg- is below.

Cheers
Ian Watson


=========snip=============


program define lg

   version 8.0
   syntax [anything]

   tokenize `anything'

   cd "`1'"
   log using "`1'", append text
   di "This session began at: $S_TIME on: $S_DATE"

end



Rachel wrote:
Since my log files are extremely long, I'd like a way of tracking what
exactly I did each day, so I can know which log file to comb through
if I want to find old estimation results.

I realize this is a broad question, but what is the best way of doing
this?  Is there some way of keeping a meta-log, or of making
meta-annotations on log files?

Thanks,
Rachel
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index