Skip to content

sconscript.log does not capture logs from multiple scripts #139

@zhizhongpu

Description

@zhizhongpu

Issue demo: 4ab2405. To reproduce, go to this commit and run scons --clean && scons

Issue description:

Note that under the set-up above, we have two scripts which run sequentially to produce outputs under output/derived/wb_clean:

  • source/derived/wb_clean/build.py, which
    • takes more than 17 seconds
    • produces gdp_education.csv
    • prints "File 'output/derived/wb_clean/gdp_education.csv' saved successfully."
  • source/derived/wb_clean/takelogs.do, which
    • takes in gdp_education.csv
    • takes 2 seconds
    • prints a bunch of (arguably useless) Stata logs like the below

  ___  ____  ____  ____  ____ ®
 /__    /   ____/   /   ____/      StataNow 19.5
___/   /   /___/   /   /___/       MP—Parallel Edition

The problem is that output/derived/wb_clean/sconscript.log only contains the Stata print-outs. Also, the time stamps reflect only the time taken by the .do file.

This has two downsides. First, a user may be interested in keeping track of warnings / print-outs from the first script; second, a user may be interested in the runtime of the first script. The current set-up does not suppose these uses.

I suspect that the underlying problem is that each script has its own sconscript.log, but the later one overwrites the earlier one. I think we might be able to change the builder so that sconscript.logs append to, instead of overwrite, each other.

fyi @jmshapir @liaochris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions