-
Notifications
You must be signed in to change notification settings - Fork 39
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
Advanced File Output #65
Conversation
- Temporary buffer to reduce writes frequency - Dynamic log files creation inside a specified directory
Updated naming format to have a fixed len and use _ instead of space to avoid forgetting quotes in console commands like "cat ~/logs/...."
Hi! Thanks for the nice pull request! However, before further reviewing your request, unfortunately, the check for Dart 2.17 failed. I would suggest that you simply replace your usages with the original implementation behind the property: static String get lineTerminator => isWindows ? '\r\n' : '\n'; https://github.com/dart-lang/sdk/blob/3.1.0/sdk/lib/io/platform.dart#L245 |
Done |
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 the nice pull request, please check my comments and feel free to ask if you need more clarification!
That was quick, thanks! |
- General function for nums padding - String path - Detailed class explaination - Non-null assertion operator in _openFile
- Made most of the fields private - Added custom file format field - Changed default naming logic to a more traditional one - Fixed buffer flushing logic on destroy + added a test - Added logging for exceptions on closing a file - Simplified open and close file function calls
Feel free to overwrite my changes as you see fit. |
Please review the new documentation, I tried to implement your description as well as I could! |
Thanks, yeah, English is not my native lang, your text looks much better. |
Co-authored-by: Severin <[email protected]>
Thx for approval, can't wait to see it released! |
Sure, maybe next time don't close it if you want it to be merged ;) Anyway, thanks again for the nice FileOutput! |
logger v2.2.0 is now available on pub.dev! |
so sorry if this is a dumb question, but does this library include file logging or is it a possible future thing? |
If you're using version 2.2.0 or newer, it does include Advanced File Logging with functions described above. It also includes basic FileLogger that existed even earlier. |
This type of file output is mainly targeted for low-cost IoT platforms (like RPi). It optimises some of the aspects of the original File Output, specifically: