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
Add support for custom timestamp. Closes #103 #104
Conversation
Is there a reason you'd want the logs in a different timezone than the system itself? That's the reason we don't do this currently, we want the logs to always reflect the time of the system. |
@evanphx I put in the Having said that, However, the motivation behind this PR is that we use |
@binaek Gotcha, that makes sense. I'm wondering if rather than just a flag to set UTC, we should allow for someone to pass in a function that returns the current time. That would allow them maximum flexibility to calculate the current time in whatever form they want. |
@evanphx That sounds like a good approach. Let me have a dig and update the PR. |
@evanphx I have updated the PR with support for a custom time function - with a default which returns Take a look when you get the chance. |
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.
Super minor bits, no need to create a closure here, can just use time.Now
directly.
Huh! Not sure why I put the closure in there. Let me update the PR when I am at my desk |
@evanphx PR updated |
@evanphx let me know if you think this requires other changes |
No description provided.