refactor: migrate all remaining modules to use shared aitbc.logging from aitbc-core package

- Replace `import logging` with `from aitbc.logging import get_logger` across blockchain-node scripts and coordinator-api modules
- Update logger initialization from `logging.getLogger(__name__)` to `get_logger(__name__)` in 30+ files
- Add production configuration validators for API keys, HMAC secret, and JWT secret in coordinator config
- Enhance coordinator startup with comprehensive initialization logging
This commit is contained in:
oib
2026-02-28 21:17:53 +01:00
parent f6ee77f497
commit 7cb0b30dae
81 changed files with 3378 additions and 153 deletions

1537
apps/wallet-daemon/poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
[tool.poetry]
name = "aitbc-wallet-daemon"
version = "0.1.0"
description = "AITBC Wallet Daemon Service"
authors = ["AITBC Team <team@aitbc.dev>"]
readme = "README.md"
packages = [{include = "app", from = "src"}]
[tool.poetry.dependencies]
python = "^3.13"
fastapi = "^0.111.0"
uvicorn = {extras = ["standard"], version = "^0.30.0"}
pydantic = "^2.7.0"
pydantic-settings = "^2.2.1"
sqlalchemy = {extras = ["asyncio"], version = "^2.0.47"}
aiosqlite = "^0.20.0"
sqlmodel = "^0.0.16"
httpx = "^0.27.0"
python-dotenv = "^1.0.1"
asyncpg = "^0.29.0"
aitbc-core = {path = "../../packages/py/aitbc-core"}
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.0"
pytest-asyncio = "^0.23.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
import base64
import logging
from aitbc.logging import get_logger
import base64
from fastapi import APIRouter, Depends, HTTPException, status, Request
@@ -28,7 +28,7 @@ from .ledger_mock import SQLiteLedgerAdapter
from .receipts.service import ReceiptValidationResult, ReceiptVerifierService
from .security import RateLimiter, wipe_buffer
logger = logging.getLogger(__name__)
logger = get_logger(__name__)
_rate_limiter = RateLimiter(max_requests=30, window_seconds=60)

View File

@@ -5,9 +5,9 @@ from psycopg2.extras import RealDictCursor
from typing import Optional, Dict, Any, List
from datetime import datetime
import json
import logging
from aitbc.logging import get_logger
logger = logging.getLogger(__name__)
logger = get_logger(__name__)
class PostgreSQLLedgerAdapter:
"""PostgreSQL implementation of the wallet ledger"""