loguru
loguru copied to clipboard
Improved Documentation: Added Advanced options, best practices, troubleshooting tips
Added advanced configuration options, best practices, and troubleshooting tips, users can better leverage Loguru's features and integrate it more effectively into their projects.
Advanced Configuration:
Logging to Multiple Destinations (Sinks): Instructions on how to add multiple sinks to direct logs to various destinations simultaneously.
Custom Log Formats: Guidance on customizing log message formats to include specific information. Log Rotation and Retention: Details on how to automatically rotate logs and manage retention policies.
Best Practices:
Recommendations on initializing the logger early in the application. Advice on using context managers for dynamic context. Tips to avoid common pitfalls like global imports.
Troubleshooting:
Solutions for logs not appearing due to misconfiguration. Fixes for duplicate logs caused by multiple logger instances. Performance considerations to prevent logging from slowing down the application. These additions aim to:
Improve Usability:
Provide deeper insights into Loguru's features, making it easier for users to leverage its full potential. Assist New Users: Help newcomers integrate Loguru into their projects with clear guidelines and examples. Support Existing Users: Offer advanced tips and troubleshooting to enhance current implementations. No existing content has been removed; the new sections build upon the current documentation to offer a more comprehensive guide.
Hey @ThomasOli, thank you for your improvements to the Loguru documentation.
I prefer these additional tips to appear on the Help & Guides page rather than in the Readme (the latter should remain a short introduction to the various functions). A new dedicated “Troubleshooting” page to explain common pitfalls sounds like a good idea too.
Would it work for you if I updated the PR in this way?
As mentioned in the previous comment, I've updated your PR and moved your documentation improvement to a new “Troubleshooting” page. I haven't included everything, as I found some examples repetitive with those in the Readme.
The new page looks quite sparse at the moment, but I'll make it more exhaustive in the next few days. Hopefully it should be useful as a reference for some of the tickets that are opened recurrently.