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

FFCx swallows all warnings, including warnings raised in DOLFINx #712

Open
jorgensd opened this issue Aug 23, 2024 · 0 comments
Open

FFCx swallows all warnings, including warnings raised in DOLFINx #712

jorgensd opened this issue Aug 23, 2024 · 0 comments
Milestone

Comments

@jorgensd
Copy link
Member

As we have logging.captureWarnings(capture=True) in FFCx init, all warnings (even from other programs) are swallowed.
MWE:

import warnings
warnings.warn("test1", RuntimeWarning)

import ffcx

warnings.warn("test2", RuntimeWarning)

returns

/root/shared/debug/import_ffcx.py:2: RuntimeWarning: test1
  warnings.warn("test1", RuntimeWarning)

This means that Deprecation warnings and other warnings added to DOLFINx will never appear, except in the FFCx logger (which is unintuitive).

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

2 participants