diff --git a/hatch_build/cli.py b/hatch_build/cli.py index 8616b53..b198ae0 100644 --- a/hatch_build/cli.py +++ b/hatch_build/cli.py @@ -1,11 +1,10 @@ -import sys from argparse import ArgumentParser from enum import Enum -from logging import Formatter, StreamHandler, getLogger from pathlib import Path from typing import TYPE_CHECKING, Callable, Dict, List, Literal, Optional, Tuple, Type, Union, get_args, get_origin from hatchling.cli.build import build_command +from pkn.logging import getSimpleLogger if TYPE_CHECKING: from pydantic import BaseModel @@ -22,11 +21,7 @@ def _initlog(level: str = "WARNING"): global _log - _log = getLogger(__name__) - _handler = StreamHandler(stream=sys.stderr) - _formatter = Formatter("[%(asctime)s][%(name)s][%(levelname)s]: %(message)s", datefmt="%Y-%m-%dT%H:%M:%S%z") - _handler.setFormatter(_formatter) - _log.addHandler(_handler) + _log = getSimpleLogger(__name__) _log.setLevel(level) diff --git a/pyproject.toml b/pyproject.toml index bad4358..bf4190e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ classifiers = [ dependencies = [ "hatchling>=1.14.1,<1.28", + "pkn>=0.3,<0.4", ] [project.optional-dependencies]