Migrate agent-coordinator app to centralized aitbc package utilities
- Migrate 13 files from logging to aitbc.get_logger - main.py, monitoring/prometheus_metrics.py, monitoring/alerting.py - auth/jwt_handler.py, auth/permissions.py, auth/middleware.py - consensus/distributed_consensus.py - ai/realtime_learning.py, ai/advanced_ai.py - protocols/communication.py, protocols/message_types.py - routing/load_balancer.py, routing/agent_discovery.py - Remove logging.basicConfig() from main.py
This commit is contained in:
@@ -8,9 +8,10 @@ import bcrypt
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Dict, Any, Optional, List
|
||||
import secrets
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
from aitbc import get_logger
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
class JWTHandler:
|
||||
"""JWT token management and validation"""
|
||||
|
||||
@@ -6,12 +6,12 @@ Implements JWT and API key authentication middleware
|
||||
from fastapi import HTTPException, Depends, status
|
||||
from fastapi.security import HTTPBearer, HTTPAuthorizationCredentials
|
||||
from typing import Dict, Any, List, Optional
|
||||
import logging
|
||||
from functools import wraps
|
||||
|
||||
from aitbc import get_logger
|
||||
from .jwt_handler import jwt_handler, api_key_manager
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger = get_logger(__name__)
|
||||
|
||||
# Security schemes
|
||||
security = HTTPBearer(auto_error=False)
|
||||
|
||||
@@ -6,9 +6,10 @@ Implements RBAC with roles, permissions, and access control
|
||||
from enum import Enum
|
||||
from typing import Dict, List, Set, Any
|
||||
from dataclasses import dataclass
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
from aitbc import get_logger
|
||||
|
||||
logger = get_logger(__name__)
|
||||
|
||||
class Permission(Enum):
|
||||
"""System permissions enumeration"""
|
||||
|
||||
Reference in New Issue
Block a user