Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • More than one log file

    Hi
    I would like to have more than one log file open at the same time.
    Eg I would like to run the following;
    Code:
    . capture log close
    
    . log using test1, replace
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------
          name:  <unnamed>
           log:  U:\Documents\STATA\Presentations\literate_programming\test1.smcl
      log type:  smcl
     opened on:   5 Jun 2017, 22:39:42
    
    . log using test2, replace
    log file already open
    r(604);
    The idea is if possible to direct different outputs generated in one process into several different log files
    Kind regards

    nhb

  • #2
    Niels,

    you need to use a different syntax including giving a name to your new log file using the "name" option; here is an example:
    Code:
    log using aff3, replace text name(aff3)
    where "aff3.log" is my second log file (I am not a fan of smcl)

    Comment


    • #3
      Hi
      Found out a solution myself. Just needed a name option in the second command
      Code:
      log using test2, replace name(test2)
      Sorry to bother you all
      Kind regards

      nhb

      Comment


      • #4
        Hi Rich
        Thank you for your effort.
        And I'm not not a fan of smcl, either
        Kind regards nhb
        Kind regards

        nhb

        Comment

        Working...
        X