Skip to content

Conversation

@milov-dmitriy
Copy link
Collaborator

Для Global Catalog добавлено логирование в отдельный файл. Реализовано через DI

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds separate logging functionality for the Global Catalog server by implementing dedicated logger instances through Dependency Injection (DI). The changes enable LDAP and Global Catalog servers to log to separate files (ldap_{time}.log and global_catalog_{time}.log) instead of sharing a single logger.

Changes:

  • Added two new logger types (LDAPLogger and GlobalCatalogLogger) with separate provider methods in the DI container
  • Refactored PoolClientHandler to accept a logger instance via constructor injection instead of using a module-level logger
  • Updated factory functions to inject the appropriate logger for each server type

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
app/ioc.py Defines new logger types and provider methods for LDAP and Global Catalog loggers with separate file handlers
app/ldap_protocol/server.py Refactored to accept logger via DI, removed module-level logger setup, updated all logging calls to use instance logger
app/multidirectory.py Updated factory functions to retrieve and inject appropriate logger instances for each server type
tests/conftest.py Updated test fixture to pass a test logger to PoolClientHandler
.package/docker-compose.yml Added volume mount for the logs directory to persist log files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants