__init__.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- coding: utf-8 -*-
  2. """
  3. Strukturiertes Logging-Modul für Trixy.
  4. Bietet JSON-fähiges Logging mit Korrelations-IDs, Kontext-Propagation
  5. und verschiedenen Output-Formaten für Enterprise-Observability.
  6. """
  7. from trixy_core.utils.logging.context import LogContext, get_correlation_id, set_correlation_id
  8. from trixy_core.utils.logging.structured import StructuredLogger, get_logger
  9. from trixy_core.utils.logging.formatters import JSONFormatter, TextFormatter, CompactFormatter
  10. from trixy_core.utils.logging.handlers import RotatingFileHandler, SyslogHandler, AsyncHandler
  11. from trixy_core.utils.logging.file_router import (
  12. FileLogRouter,
  13. init_file_router,
  14. shutdown_file_router,
  15. log_as,
  16. get_file_router,
  17. )
  18. __all__ = [
  19. # Context
  20. "LogContext",
  21. "get_correlation_id",
  22. "set_correlation_id",
  23. # Logger
  24. "StructuredLogger",
  25. "get_logger",
  26. # Formatters
  27. "JSONFormatter",
  28. "TextFormatter",
  29. "CompactFormatter",
  30. # Handlers
  31. "RotatingFileHandler",
  32. "SyslogHandler",
  33. "AsyncHandler",
  34. # File Router
  35. "FileLogRouter",
  36. "init_file_router",
  37. "shutdown_file_router",
  38. "log_as",
  39. "get_file_router",
  40. ]