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

___select_logger: combining TeeLogger with ____FilteredLogger #29

Open
oxinabox opened this issue Apr 8, 2020 · 0 comments
Open

___select_logger: combining TeeLogger with ____FilteredLogger #29

oxinabox opened this issue Apr 8, 2020 · 0 comments

Comments

@oxinabox
Copy link
Member

oxinabox commented Apr 8, 2020

For each of the filtered loggers,
we could define a convience select_logger
as for example:

function early_select_logger(cond_func, if_true_logger::AbstractLogger, if_false_logger::AbstractLogger)
    return TeeLogger(
         EarlyFilteredLogger(cond_func, if_true_logger),
         EarlyFilteredLogger(!cond_func, if_false_logger),
     )
end

This seems like a common usecase.
E.g.

https://github.com/SciML/DiffEqBase.jl/blob/2465183e2e31dd2d2be82de45ce2e8e7b9412697/src/utils.jl#L261-L278

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