feat(logging): add configurability for log levels preference#1853
feat(logging): add configurability for log levels preference#1853yinwm merged 8 commits intosipeed:mainfrom
Conversation
|
#1828 is a lighter approach,no need add complexity I would suggest it |
Disagree, my approach is like any other enterprise grade application where we are having control over log levels through the config file. Not sure why it is being considered "complex" |
yinwm
left a comment
There was a problem hiding this comment.
LGTM. Reviewed: default log level choice is intentional, tests are comprehensive, debug flag correctly overrides config.
Related PR: #1828This PR has a dependency relationship with #1828 (feat(logger): add PICOCLAW_LOG_FILE env var for file-only logging). Why This PR Should Be Merged FirstThis PR (#1853) should be merged before #1828. Reasons:
Conflict Files
After Merge: Action for #1828Once this PR is merged, #1828 should:
Feature Relationship
Both features work together: Set log level via config, log destination via envPICOCLAW_LOG_FILE=/var/log/picoclaw.log picoclaw agent (config.json has "log_level": "debug")``` Recommendation: ✅ This PR is ready to merge. Please approve and merge before #1828. |
|
Hi @kunalk16 , thanks for the pr! I noticed the log change from the current main branch. However, for the config, it is a bit improper here to put |
📝 Description
As of now, in the latest release, when we perform commands such as "picoclaw agent", it defaults to log level info and if we use the --debug parameter with the "picoclaw agent" command, it overrides to log level debug. Users may or may not be needing the logging and hence, this PR is adding configurability to the logging.
🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
Closes #1848
📚 Technical Context (Skip for Docs)
🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
**Before the change** **log level INFO by default**After the change

Default config after onboarding
Config updated to log level fatal

Config updated to log level error

Config updated to log level debug

Config updated to log level with invalid value falls back to info

Config overridden to log level debug when --debug parameter is used

☑️ Checklist