Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: How to get -project- to log in text instead of smcl.
From
Jorge Eduardo Pérez Pérez <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: How to get -project- to log in text instead of smcl.
Date
Tue, 12 Nov 2013 16:50:52 -0500
Thank you for the guidance.
I understand your arguments for smcl, this is definitely a personal
preference. I usually use Notepad ++ for Stata dofiles, and I want to
see my dofiles and logs in the same window. smcl puts a lot of clutter
in my logfiles when reading from a external text editor that does not
interpret smcl.
A smcl language definition for Notepad ++ would solve my problem partially.
At the moment, I am trying to put calls to -translate- after execution
of the embedded dofiles but it fails on the first call. I think it
fails on the first run because the smcl files have not yet been
created. This would imply the translate commands will not work if I
try a fresh rebuild after using project, rmcreated.
Here's an example, My master dofile is:
project, doinfo
local master "`r(pdir)'"
local doname "`r(dofile)'"
project, do(hello.do)
translate "`master'/hello.scml" "hello.log", replace
project, do(hello2.do)
translate "`master'/hello2.scml" "hello2.log", replace
And my nested dofiles hello and hello2 are both the same:
di "Hello World"
If I try to build my project, the -translate- calls crash. This does
not change if I remove the `master' part from the dofiles adresses.
See the log at the end.
Is there any way to solve this? Thanks!
. project, setup
r; t=0.13 15:20:29
. project , setmaster("C:\Users\JorgeEduardo\Dropbox\test\master.do")
+--------------------------------------------+
| Project |
| |
| Name Full path to directory |
|--------------------------------------------|
| master C:/Users/JorgeEduardo/Dropbox/test |
+--------------------------------------------+
r; t=0.03 15:20:34
. project master, build
Project directory : C:/Users/JorgeEduardo/Dropbox/test
C:/Users/JorgeEduardo/Dropbox/test/master_files.dta not found or not
in Stata format
Build start: 12 Nov 2013, 15:20:42
===================================================================================================
project master > do-file uses original: "master.do" filesig(3095391302:230)
(note: file C:\Users\JorgeEduardo\Dropbox\test\master.smcl not found)
---------------------------------------------------------------------------------------------------
name: plog_1
log: C:\Users\JorgeEduardo\Dropbox\test\master.smcl
log type: smcl
opened on: 12 Nov 2013, 15:20:42
. project, doinfo
project master > Project Name: master
project master > Project Dir.: C:/Users/JorgeEduardo/Dropbox/test
project master > Build start : 12nov2013, 15:20:42
project master > Do-file Name: master.do
. local master "`r(pdir)'"
. local doname "`r(dofile)'"
. project, do(hello.do)
project master > do-file uses original: "hello.do" filesig(54926172:16)
(note: file C:\Users\JorgeEduardo\Dropbox\test\hello.smcl not found)
---------------------------------------------------------------------------------------------------
name: plog_2
log: C:\Users\JorgeEduardo\Dropbox\test\hello.smcl
log type: smcl
opened on: 12 Nov 2013, 15:20:43
.
end of do-file
name: plog_2
log: C:\Users\JorgeEduardo\Dropbox\test\hello.smcl
log type: smcl
closed on: 12 Nov 2013, 15:20:43
---------------------------------------------------------------------------------------------------
project master > do-file creates: "hello.smcl" filesig(3005518999:444)
. translate "`master'/hello.scml" "hello.log", replace
file C:/Users/JorgeEduardo/Dropbox/test/hello.scml not found
r(601);
end of do-file
name: plog_1
log: C:\Users\JorgeEduardo\Dropbox\test\master.smcl
log type: smcl
closed on: 12 Nov 2013, 15:20:43
---------------------------------------------------------------------------------------------------
r(601); t=0.14 15:20:43
--------------------------------------------
Jorge Eduardo Pérez Pérez
Graduate Student
Department of Economics
Brown University
On Tue, Nov 12, 2013 at 4:05 PM, Robert Picard <[email protected]> wrote:
> This has been discussed previously on statalist, with a thread starting with:
>
> http://www.stata.com/statalist/archive/2013-08/msg00492.html
>
> Generally, I feel that text formatted log files lose visual
> information and functionality (hyperlinks) compared to smcl. At any
> time, -translate- can be used to convert from smcl to text (or PDF) so
> I don't quite understand the need for text log files.
>
> One of the reasons why -project- ignores the -set logtype- is that,
> like globals, its scope extends beyond the currently running do-file.
> What happens if you change the log format interactively; does that
> invalidate the whole build? What happens if you include a -set
> logtype- within a do-file; is -project- supposed to remember the
> setting if the do-file is skipped in a subsequent build?
>
> On the other hand, I suppose there could be an overall setting for
> each project. I'll put this on my list of things to think about.
>
> Robert
>
> On Tue, Nov 12, 2013 at 3:16 PM, Jorge Eduardo Pérez Pérez
> <[email protected]> wrote:
>> I have been using the user written command -project- by Robert Picard,
>> version 1.2.0 on Stata 13.1.
>>
>> Is there a way to make project produce log files in .txt extension
>> instead of the default smcl? -project- seems to override Stata's -set
>> logfile- settings.
>>
>> Thanks!
>> --------------------------------------------
>> Jorge Eduardo Pérez Pérez
>> Graduate Student
>> Department of Economics
>> Brown University
>>
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/