Commit 963d48fa authored by Stan Hu's avatar Stan Hu

Log Geo file download attempts and status

parent e24d715b
......@@ -4,8 +4,13 @@ module Geo
def execute
try_obtain_lease do |lease|
start_time = Time.now
bytes_downloaded = downloader.execute
success = bytes_downloaded && bytes_downloaded >= 0
log_info("File download",
success: success,
bytes_downloaded: bytes_downloaded,
download_time_s: (Time.now - start_time).to_f.round(3))
update_registry(bytes_downloaded) if success
end
end
......
......@@ -27,8 +27,9 @@ module Geo
klass_name.camelize
end
def log_info(message)
def log_info(message, details = {})
data = log_base_data(message)
data.merge!(details) if details
Gitlab::Geo::Logger.info(data)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment