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

Feature/logging #173

Merged
merged 7 commits into from
Dec 7, 2014
Merged

Feature/logging #173

merged 7 commits into from
Dec 7, 2014

Conversation

jhamman
Copy link
Member

@jhamman jhamman commented Dec 5, 2014

This is working now.

There are two steps left to fully use the added functionality.

  1. Replace Existing printf statements with the appropriate log functions
  2. Move the initialization of the log string (file or stdout/stderr) to a function in drivers/shared/vic_log.c

Neither of these steps need to be done immediately and the logging functions work out of the box with this PR.

@bartnijssen
Copy link
Member

Merge now or wait for the remaining pieces?

@jhamman
Copy link
Member Author

jhamman commented Dec 5, 2014

That's the question. We should discuss how we want to delineate stderr and stout, errors, and exit codes. Currently there is quite the hodgepodge.

Joe Hamman added 3 commits December 5, 2014 23:02
- Print statements now go to the global FILE stream "LOG_DEST"
- Logging and error handling is controlled via macros in vic_log.h
- All references to vicerror() and nrerror() have been replaced with log_err()
…ll initialize_log() before a log function is used and setup_logging() after the global parameter file is read
@jhamman
Copy link
Member Author

jhamman commented Dec 7, 2014

Alright, this is ready. Was tested on for both drivers, logging to stderr and a logfile.

bartnijssen added a commit that referenced this pull request Dec 7, 2014
@bartnijssen bartnijssen merged commit 9809bdf into UW-Hydro:develop Dec 7, 2014
@jhamman
Copy link
Member Author

jhamman commented Dec 8, 2014

closes #64

@jhamman jhamman deleted the feature/logging branch December 22, 2014 23:48
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

Successfully merging this pull request may close these issues.

None yet

2 participants