Skip to content

Commit

Permalink
DEV: add console logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Sep 4, 2024
1 parent 56c70a7 commit 3bac072
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions reneo/workflow/scripts/reneo.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,22 @@


def setup_logging(**kwargs):

logging.basicConfig(
filename=kwargs["log"],
level=logging.DEBUG,
format="%(asctime)s %(message)s",
format="%(asctime)s - %(levelname)s - %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
logging.captureWarnings(True)
logger = logging.getLogger(__version__)
logger = logging.getLogger(f"reneo {__version__}")

formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
consoleHeader = logging.StreamHandler()
consoleHeader.setFormatter(formatter)
consoleHeader.setLevel(logging.INFO)
logger.addHandler(consoleHeader)

return logger


Expand Down

0 comments on commit 3bac072

Please sign in to comment.