bessagroup / f3dasm

Framework for Data-Driven Design & Analysis of Structures & Materials (F3DASM)
https://f3dasm.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
115 stars 30 forks source link

Change the default behaviour of the logger so that it doesn't display messages #196

Closed mpvanderschelling closed 1 year ago

mpvanderschelling commented 1 year ago

Fixes #186

mpvanderschelling commented 1 year ago

The default logging level of the f3dasm logger is set to warning. This means that any message that is labeled as INFO or DEBUG will not be displayed by default

To enable logging in any other level, the user has to do the following:

from f3dasm import logger
import logging

logger.setLevel(logging.INFO)

The logger object is a standard logger from the logging library

BernardoFerreira commented 1 year ago

Leaving the warning as the default logging level seems the expected behavior to me.

Setting other logging option looks pretty straightforward as well.

I think this fix can be merged and the issue closed - good job!