Log filter for reducing verbose-level of adcp and underwater #185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to bug identified in #155
I've had a quick go at a bit of a hack to avoid the log being flooded with writing-to-file messages for every execution of adcp and underwater measurements. As I say it's a bit of a hack but it avoids having to change anything in Parcels, rather it simply prevents duplicate messages from being printed when running virtualship (but only for the adcp and underwater instruments and then it's switched off again).
The way I've written it means the log filter is applied by default for adcp and underwater instruments, but there is an option to switch it off in simulate_measurements.py by setting
log_filtertoFalseinsimulate_adcp/simulate_ship_underwater_st.Also, not sure if it's a bit messy to have log_filter.py sitting in src/virtualship/, is there somewhere better to house it?
@erikvansebille @VeckoTheGecko @ammedd what do you think?