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
Implement support of date/time format specifiers in log and error log file names #51945
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d86ceef
Implement log file names rendering
sirvickr 479efaa
Add clickhouse_log_file and clickhouse_error_log_file args to add_ins…
sirvickr fef71ab
Add inegration test
sirvickr acd17c7
Make a deal with the "Style check"
sirvickr 7080d85
Amend the documentation
sirvickr 63fbde4
Reformat cluster.py (add empty line)
sirvickr 3edee41
Add AWST time zone abbreviation to the ignore list
sirvickr 87ea1b6
Recover the integration test
sirvickr 95fedae
Refine the integration test code
sirvickr 5b102ce
Amend English version of settings.md
sirvickr e311d31
Merge branch 'master' into ADQM-950-B
sirvickr e592c7c
Fix integration tests - recover clickhouse_stay_alive_command lost by…
sirvickr File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This breaks relative path configuration for non-daemon servers. Consider the following example:
The log path will be modified as
logs/logs/clickhouse-server.log
.cc @sirvickr
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.
That's the exact reason why those format specifiers currently do not apply to the "path" part - only to the file name.
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.
@amosbird,
path.replace_filename()
does the trick.If someone decides another day to apply the specifiers to the full path, they will have to take into consideration this issue about non-daemon servers.
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.
@sirvickr I'm confused. If that's the expected behavior, why not do the following:
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.
@amosbird, you are right, my code looks like an ugly typo, to say the least. This one is more concise, clear and correct:
It looks like it should be amended.
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.
I guess,
replace_filename()
extracts the file name from its argument, otherwise it wouldn't work properly.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.
And thank you for noticing.
I'm thinking of creating a "follow-up" PR to clean up this line of code. Or may be you'd rather amend this code by yourself?
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.
No problem!
Perfect. Please go ahead for amending it :)