Skip to content

Commit

Permalink
MAINT: a little bit of trial and error on what will make fenics logs …
Browse files Browse the repository at this point in the history
…silent in CI
  • Loading branch information
jotelha committed Jan 14, 2024
1 parent 2c39664 commit aca11d8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ class ArgumentDefaultsAndRawDescriptionHelpFormatter(
# fenics writes some log messages to stdout. If we pipe the output,
# we don't want that, hence here we have to suppress fenics logging
# if no output file has been specified
dolfin.cpp.log.set_log_active(False)
try:
dolfin.cpp.log.set_log_active(False)
logging.getLogger('UFL').setLevel(logging.WARNING)
logging.getLogger('FFC').setLevel(logging.WARNING)
except: # if fenics not available, ignore any error here
pass

pnp.solve()

Expand Down

0 comments on commit aca11d8

Please sign in to comment.