fix: [#664] resolve date mismatch between log file name and log entries#1020
Merged
fix: [#664] resolve date mismatch between log file name and log entries#1020
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Fixes a date mismatch issue by aligning the log file name dates with the log entry dates through correcting the clock initialization.
- Moves from using the system's default timezone to fetching the application timezone from configuration.
- Updates the clock creation to utilize the app-specific timezone.
Comments suppressed due to low confidence (1)
log/logger/daily.go:47
- No tests appear to cover the new timezone behavior. Adding tests to validate correct log date alignment across different time zones would improve confidence in this fix.
rotatelogs.WithClock(rotatelogs.NewClock(carbon.Now(daily.config.GetString("app.timezone")).StdTime())),
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1020 +/- ##
==========================================
+ Coverage 70.97% 70.99% +0.01%
==========================================
Files 170 170
Lines 11705 11701 -4
==========================================
- Hits 8308 8307 -1
+ Misses 3044 3042 -2
+ Partials 353 352 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
hwbrzzl
reviewed
Apr 29, 2025
Comment on lines
+21
to
+23
| mockConfig := mocksconfig.NewConfig(t) | ||
| mockConfig.EXPECT().GetString("logging.default").Return("test").Once() | ||
| mockConfig.EXPECT().GetString("logging.channels.test.driver").Return("single").Once() |
This was referenced Apr 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📑 Description
Closes goravel/goravel#664
✅ Checks