-
Notifications
You must be signed in to change notification settings - Fork 495
Multi transport logging #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this @MattMorgis! Directionally looks good to me, but I have a few suggestions which would be great to incorporate before merging. Please let me know if you have any questions on them, and thanks again!
@saqadri I think I addressed all of your feedback. I also updated the README and the basic agent example to reflect the new config options. Let me know if you need anything else! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all the feedback. Really nice work @MattMorgis!
@@ -183,6 +213,12 @@ class LoggerSettings(BaseModel): | |||
path: str = "mcp-agent.jsonl" | |||
"""Path to log file, if logger 'type' is 'file'.""" | |||
|
|||
# Settings for advanced log path configuration | |||
path_settings: Optional["LogPathSettings"] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, any reason for referencing the type as "LogPathSettings"
instead of LogPathSettings
? Could do LogPathSettings | None
if you drop the quotations. Just curious, not a big deal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha, nice catch. A combination of Claude doing it + me still new enough at Python to not notice. I can submit a follow up, the rest of the file uses the | None
pattern
# Default fallback | ||
return settings.path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps at this point we should raise ValueError because we should have been able to generate something valid by this point?
Allows for a config like this:
Keeps backward compatibility: