feat: add ability to log to a file#885
Conversation
|
@carlosm27 is attempting to deploy a commit to the sparckles Team on Vercel. A member of the Team first needs to authorize it. |
|
Should we add the ability to add more configurations, like timestamps, levels, etc? |
CodSpeed Performance ReportMerging #885 will not alter performanceComparing Summary
|
|
Hey @carlosm27 👋 How would you use this new interface? |
Hey @sansyrox. I would use it to create log files with timestamps, log level and with and add rotation policy. What features are more appropiate for this interface? |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
for more information, see https://pre-commit.ci
07f28de to
0b766c9
Compare
|
✨ No issues found! Your code is sparkling clean! ✨ |
5fb08e0 to
0472e42
Compare
sansyrox
left a comment
There was a problem hiding this comment.
Thanks for tackling this, @carlosm27 — file logging (#841) is genuinely useful and the FileHandler approach is the right idea. A couple of things before we can merge: the PR accidentally commits a compiled Windows binary (robyn/robyn.cp311-win_amd64.pyd) which needs to be removed, and the changes to integration_tests/index.py are demo snippets rather than an actual test. One functional concern: our log messages are wrapped with ANSI color codes via _format_msg, so they'd get written into the file as raw escape sequences — could you strip colors for the file handler? Finally, a quick rename to something like log_to_file would read more naturally. Happy to help get this over the line once those are addressed!
Description
This PR fixes #841
This PR adds the ability to create a log file.
This is an example of how to do it: