mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 14:24:31 +00:00
e3706f01bf
- tonutils 2.0.0: TonapiClient → ToncenterV3Client, wallet.transfer() - classes → plain async functions across all utils and methods - core/: constants.py, cookies.py, exceptions.py extracted - DEVICE constant in constants.py (single source of truth) - account/device serialised with json.dumps() in all tx payloads - tests: unittest → pytest, conftest.py fixtures, 001/002 naming - pyproject.toml: pytest + ruff config - min balance check: 0.056 TON
32 lines
797 B
Python
32 lines
797 B
Python
import logging
|
|
|
|
|
|
def setup_logging() -> None:
|
|
formatter = logging.Formatter(
|
|
fmt="[%(asctime)s] - %(levelname)s: %(message)s",
|
|
datefmt="%d.%m.%y %H:%M:%S"
|
|
)
|
|
|
|
console_handler = logging.StreamHandler()
|
|
console_handler.setLevel(logging.INFO)
|
|
console_handler.setFormatter(formatter)
|
|
|
|
file_handler = logging.FileHandler(
|
|
"FragmentAPI.log",
|
|
mode="w",
|
|
encoding="utf-8"
|
|
)
|
|
file_handler.setLevel(logging.DEBUG)
|
|
file_handler.setFormatter(formatter)
|
|
logging.basicConfig(
|
|
level=logging.DEBUG,
|
|
handlers=[console_handler, file_handler],
|
|
force=True
|
|
)
|
|
|
|
logging.getLogger("httpx").setLevel(logging.INFO)
|
|
logging.getLogger("httpcore").setLevel(logging.WARNING)
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|