Commit 47bc54f1 authored by Baptiste Durand's avatar Baptiste Durand

Correction : defining logger before using it

parent ece29908
......@@ -12,6 +12,18 @@ __version__ = "0.1"
GEO_TOLERANCE = 1e-12
log_level = logging.DEBUG
log_path = Path("~/ho_homog_log/activity.log").expanduser()
if not log_path.parent.exists():
log_path.parent.mkdir(mode=0o777, parents=True)
pckg_logger = logging.getLogger(__name__)
pckg_logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(
"%(asctime)s :: %(levelname)s :: %(name)s :: %(message)s", "%Y-%m-%d %H:%M:%S"
)
try:
from . import geometry, mesh_tools, mesh_generate
except ImportError:
......@@ -33,15 +45,6 @@ try:
except ImportError:
pckg_logger.warning("One of the following submodule imports fails : full_scale_pb, homog2d, part, toolbox_FEniCS")
log_level = logging.DEBUG
log_path = Path("~/ho_homog_log/activity.log").expanduser()
if not log_path.parent.exists():
log_path.parent.mkdir(mode=0o777, parents=True)
pckg_logger = logging.getLogger(__name__)
pckg_logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(
"%(asctime)s :: %(levelname)s :: %(name)s :: %(message)s", "%Y-%m-%d %H:%M:%S"
)
try:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment