Skip to content

Commit 19b61b9

Browse files
committed
Move to pkn
1 parent 5cbcce0 commit 19b61b9

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

hatch_build/cli.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import sys
21
from argparse import ArgumentParser
32
from enum import Enum
4-
from logging import Formatter, StreamHandler, getLogger
53
from pathlib import Path
64
from typing import TYPE_CHECKING, Callable, Dict, List, Literal, Optional, Tuple, Type, Union, get_args, get_origin
75

86
from hatchling.cli.build import build_command
7+
from pkn.logging import getSimpleLogger
98

109
if TYPE_CHECKING:
1110
from pydantic import BaseModel
@@ -22,11 +21,7 @@
2221

2322
def _initlog(level: str = "WARNING"):
2423
global _log
25-
_log = getLogger(__name__)
26-
_handler = StreamHandler(stream=sys.stderr)
27-
_formatter = Formatter("[%(asctime)s][%(name)s][%(levelname)s]: %(message)s", datefmt="%Y-%m-%dT%H:%M:%S%z")
28-
_handler.setFormatter(_formatter)
29-
_log.addHandler(_handler)
24+
_log = getSimpleLogger(__name__)
3025
_log.setLevel(level)
3126

3227

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ classifiers = [
3232

3333
dependencies = [
3434
"hatchling>=1.14.1,<1.28",
35+
"pkn>=0.3,<0.4",
3536
]
3637

3738
[project.optional-dependencies]

0 commit comments

Comments
 (0)