-
Notifications
You must be signed in to change notification settings - Fork 759
improve code for logger #822
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
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
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.
Pull Request Overview
This PR enhances logging configuration and observability features to better support production and development environments, with conditional logging behavior based on environment settings.
- Introduces environment-aware logging with separate behaviors for production vs development environments
- Adds helper functions
is_production_environment()andis_develop_environment()to check runtime environment - Enhances flexi_logger configuration with UTC timestamps, append mode, and JSON feature support
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/run.sh | Disables stdout logging and enables file-based logging with a specified directory for production-like configurations |
| rustfs/src/server/runtime.rs | Makes Tokio runtime parameter printing conditional on non-production environments |
| crates/obs/src/telemetry.rs | Suppresses warning messages in production and adds stdout formatting, append mode, and UTC timestamp configuration |
| crates/obs/src/lib.rs | Changes from selective exports to wildcard export of config module items for broader API surface |
| crates/obs/src/config.rs | Adds environment detection helper functions and basic tests for configuration defaults |
| Cargo.toml | Adds "json" feature to flexi_logger for JSON formatting support |
| Cargo.lock | Updates transitive dependencies (block-buffer, cc) as a result of dependency resolution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Type of Change
Related Issues
Summary of Changes
Checklist
make pre-commitImpact
Additional Notes
Thank you for your contribution! Please ensure your PR follows the community standards (CODE_OF_CONDUCT.md) and sign the CLA if this is your first contribution.