Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Conversation

yrobla
Copy link
Contributor

@yrobla yrobla commented Dec 18, 2024

When running servers, use a custom structlog logger that binds an extra parameter called origin. Can be: generic_server, copilot_proxy

Closes: #301

@yrobla
Copy link
Contributor Author

yrobla commented Dec 18, 2024

sample output:

image

When running servers, use a custom structlog logger that binds
an extra parameter called origin. Can be: generic_server, copilot_proxy

Closes: #301
@@ -22,7 +23,8 @@
)
from codegate.providers.copilot.streaming import SSEProcessor

logger = structlog.get_logger("codegate")
setup_logging()
Copy link
Member

Choose a reason for hiding this comment

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

Do we need this call to setup_logging(), I think it might reconfigure the logger on-the-fly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we do not set it, copilot loses the scope and is not logging with the expected format

Copy link
Member

@aponcedeleonch aponcedeleonch left a comment

Choose a reason for hiding this comment

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

Nothing, just tested and works nicely!

@yrobla yrobla merged commit 9c2c6d6 into main Dec 18, 2024
3 checks passed
@yrobla yrobla deleted the issue-301 branch December 18, 2024 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log server instance
2 participants