-
Notifications
You must be signed in to change notification settings - Fork 1
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
Logger filename fix #24
base: master
Are you sure you want to change the base?
Conversation
This uses a date time formatter to fix a couple of issues, mainly that we were using zero-based months (leading to values of 1 for January, for example) and also not padding fields, leading to incorrect lexical sorting.
Code Climate has analyzed commit d186e00 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 66.6% (50% is the threshold). This pull request will bring the total coverage in the repository to 18.3% (0.6% change). View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## master #24 +/- ##
============================================
+ Coverage 17.78% 18.37% +0.58%
- Complexity 17 18 +1
============================================
Files 13 13
Lines 371 370 -1
Branches 25 25
============================================
+ Hits 66 68 +2
+ Misses 305 302 -3
|
When I refactored the code last year, I didn't notice that months were zero-indexed unlike everything else. My fault. One thing that did get cut, though, was adding the op mode to the filename, as I had moved generation of the filename out of the robot file. It might be a good idea to readd that back in. (Maybe as an optional parameter?) |
I fixed the month index in the new logger system. |
I've noticed that the log filenames are kind of wonky, the months are zero-indexed and none of the fields are padded so lexicographical sorting isn't currently possible. This adds a utility method to generate log filenames based on a calendar entry, and uses it in the log filename generation, and also tests the new functionality.