diff --git a/src/erc7730/main.py b/src/erc7730/main.py index c63836a..4fd076f 100644 --- a/src/erc7730/main.py +++ b/src/erc7730/main.py @@ -1,4 +1,6 @@ import json +import logging +import os from pathlib import Path from typing import Annotated, assert_never @@ -23,6 +25,12 @@ from erc7730.model.resolved.descriptor import ResolvedERC7730Descriptor from erc7730.model.types import Address +if os.environ.get("DEBUG") is not None: + logging.basicConfig( + format="%(levelname)s [%(asctime)s] %(name)s - %(message)s", datefmt="%Y-%m-%d %H:%M:%S", level=logging.DEBUG + ) + + app = Typer( name="erc7730", no_args_is_help=True,