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
Integrate with lumberjack for log rotation #1504
Conversation
f52eb95
to
db0b308
Compare
db0b308
to
1a79b4c
Compare
As discussed offline:
|
0cbf74f
to
300bbf5
Compare
916f3eb
to
22b2886
Compare
22b2886
to
728c4c5
Compare
// Set up test directory. | ||
setup.SetUpTestDirForTestBucketFlag() | ||
|
||
logDirPath = setup.SetUpLogDir(logDirName) |
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.
Just curious, for mounted directly (line: 64) we didn't create directory (logDirPath), here we need to create the directory (logDirPath).
Anyway we should create the path using join here only. Then we should create the directory via utility method.
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.
The problem here was that log file is generated at the time of mount. So for mounted directory tests, the directory should be there beforehand. I've added it to run_tests_mounted_directory script and added a check to fail the test if directory is not present.
The path is different for both the tests. One is in test directory and the other in /tmp, hence we need to do this twice. This might be significant refactoring work to move the logic together so I would say we should do it in a separate PR if necessary. (Did some refactoring to make it cleaner though.)
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.
Minor comments.
b8abbba
to
3bd9264
Compare
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
* integrate with lumberjack * run perf test * fix fio error * fix operations tests * reduce number of log rotations to reduce integration test execution time * review comments * temp commit to run perf tests with trace logs * fix lint issues * temp commit * review comments * fix lint * revert perf changes * refactoring based on review comments
Description
internal/logger/logger.go
and corresponding changes tointernal/fs/fs_test.go
to remove unused logger methods.Rotated file format:
<log-file-name>-<date in YYYY-MM-DD format>T<time in HH-MM-SS.millisecond format>.<file extension>.<gz if compressed>
Example: log-2023-11-22T23-22-58.487.txt.gz
In case of remount with no change in the log file name, old logs from the previous mount will be retained and counted against the log rotation limits specified in config file.
Link to the issue in case of a bug fix.
NA
Testing details
Perf Test Results: