Log filter for reducing verbose-level of adcp and underwater#185
Closed
Log filter for reducing verbose-level of adcp and underwater#185
Conversation
Member
|
Thanks for implementing this, @j-atkins. I agree that adding a filter to avoid many duplicate messages is good, but I leave it to @VeckoTheGecko to see if this is the most effective/cleanest way to implement it |
Collaborator
|
I was talking with Jamie about this yesterday during our 1on1, and settled that it would be nice to suppress the Parcels messages here and to propogate our own. It will be cleaner - and decouples this from Parcels dev |
Collaborator
Author
|
Thanks both! I will need to make some changes to my original PR to instead suppress all Parcels messages (not just duplicates) and propagate our own. I'll put this on my to do list. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?