81 lines
1.5 KiB
Python
81 lines
1.5 KiB
Python
# 统一日志系统 - 推荐使用
|
|
from .unified_logger import (
|
|
get_logger as get_unified_logger,
|
|
get_route_logger,
|
|
configure_logging,
|
|
cleanup_logs,
|
|
get_log_stats,
|
|
unified_logger_manager,
|
|
UnifiedLogger,
|
|
)
|
|
|
|
# 向后兼容 - 保持原有接口
|
|
from .logger import (
|
|
get_logger,
|
|
log,
|
|
log_debug,
|
|
log_info,
|
|
log_warning,
|
|
log_error,
|
|
log_critical,
|
|
logger_manager,
|
|
)
|
|
|
|
from .decorators import (
|
|
log_function_call,
|
|
log_performance,
|
|
retry_on_failure,
|
|
log_it,
|
|
time_it,
|
|
)
|
|
|
|
from .exceptions import (
|
|
BaseAPIException,
|
|
ValidationException,
|
|
AuthenticationException,
|
|
AuthorizationException,
|
|
NotFoundException,
|
|
ConflictException,
|
|
RateLimitException,
|
|
ExternalServiceException,
|
|
BusinessException,
|
|
)
|
|
|
|
__all__ = [
|
|
# 统一日志系统 (推荐使用)
|
|
"get_unified_logger",
|
|
"get_route_logger",
|
|
"configure_logging",
|
|
"cleanup_logs",
|
|
"get_log_stats",
|
|
"unified_logger_manager",
|
|
"UnifiedLogger",
|
|
|
|
# 向后兼容接口
|
|
"get_logger",
|
|
"log",
|
|
"log_debug",
|
|
"log_info",
|
|
"log_warning",
|
|
"log_error",
|
|
"log_critical",
|
|
"logger_manager",
|
|
|
|
# Decorators
|
|
"log_function_call",
|
|
"log_performance",
|
|
"retry_on_failure",
|
|
"log_it",
|
|
"time_it",
|
|
|
|
# Exceptions
|
|
"BaseAPIException",
|
|
"ValidationException",
|
|
"AuthenticationException",
|
|
"AuthorizationException",
|
|
"NotFoundException",
|
|
"ConflictException",
|
|
"RateLimitException",
|
|
"ExternalServiceException",
|
|
"BusinessException",
|
|
] |