Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging option to output #130

Open
s-emerson opened this issue Jun 8, 2022 · 0 comments
Open

Add logging option to output #130

s-emerson opened this issue Jun 8, 2022 · 0 comments

Comments

@s-emerson
Copy link
Contributor

Currently, by default, NACCulator prints all progress and errors to stderr (the terminal). This makes the code take a long time to run.

In redcap2nacc, we add an argument to the command after the output file is specified. For example:

redcap2nacc -ivp <run_06-07-2022/final_Update.csv >run_06-07-2022/iv_nacc_complete.txt 2>run_06-07-2022/ivp_errors.txt

that prints all of this text to a log file called ivp_errors.txt.

We should add this option to the print statements of nacc/run_filters.py and nacc/uds3/filters.py so that the filters run faster.

It would probably look similar to how it works in redcap2nacc, which is, every print statement has a second argument called "file=sys.stderr", and then stderr is specified as a file with that "2>(filename)" argument when running the program. nacc/uds3/filters.py specifically needs this capability rather than nacc/run_filters.py, but run_filters.py is the base program that calls each function in filters.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant