Skip to content
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

Improve logging (DBAI-37) #43

Merged
merged 4 commits into from
Apr 23, 2024
Merged

Improve logging (DBAI-37) #43

merged 4 commits into from
Apr 23, 2024

Conversation

ssciolla
Copy link
Collaborator

@ssciolla ssciolla commented Apr 22, 2024

This PR aims to resolve DBAI-37. It adds INFO level log messages and timed messages to better indicate/analyze progress and performance during runs.

@ssciolla ssciolla marked this pull request as ready for review April 23, 2024 15:17
@ssciolla ssciolla added the enhancement New feature or request label Apr 23, 2024
begin
track!(status: BagStatus::BAGGING)
bag_path = File.join(@working_dir, @bag_id.to_s)
bag = BagAdapter::BagAdapter.new(bag_path)

track!(status: BagStatus::COPYING)
logger.measure_info("Copied data for bag #{@bag_id} in #{@working_dir}.") do
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bag_id is repeated for most messages I added here because there might be a future in which we add concurrency at the level of bag_courier.deliver calls. In that case, having the ID would be important for connecting log messages.

lib/bag_courier.rb Outdated Show resolved Hide resolved
@ssciolla ssciolla merged commit 3882dc7 into main Apr 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants