Proposal: Create a Common Logger Package (with Context Support) for the Project #52
Replies: 4 comments
-
I agree that we need a logging object/package that we can pass around so all parts of mcpjungle produce consistent, structured logs. But we can break this into 2 separate tasks - one is to simply provide the logging, and the other which integrates logging with OTel. For now, it is good enough if the output is produced to stdout/stderr.
This is also something we can take up later based on feedback. |
Beta Was this translation helpful? Give feedback.
-
Agreed with @duaraghav8 Phase 1: Basic Structured Logging
Phase 2: OpenTelemetry Integration
I have also opened a discussion for OTEL here: https://github.com/orgs/mcpjungle/discussions/48 This approach makes a lot of sense because:
|
Beta Was this translation helpful? Give feedback.
-
Agree we can start with basic log package and later we can improve. |
Beta Was this translation helpful? Give feedback.
-
Same. Agreed. Phase 1 can already be worked on. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I suggest creating a reusable
logger
package that can be used across the entire project.The package will support logging with context (to propagate request IDs, trace IDs, user info, etc.) and without context for standalone scripts, background jobs, or quick logging needs.
Why This Is Needed
Currently, different parts of the project use varied logging styles and configurations.
This can lead to:
Proposed Features
Unified Logging Interface
Info()
,Debug()
,Warn()
,Error()
,Fatal()
With Context
context.Context
(e.g.,request_id
,trace_id
,user_id
)Without Context
Configurable
DEBUG
,INFO
,WARN
,ERROR
)Production-Ready
Benefits
Suggested Implementation
Beta Was this translation helpful? Give feedback.
All reactions