Remove similar code on Geo::EventStore

parent 45bc7d93
...@@ -44,12 +44,17 @@ module Geo ...@@ -44,12 +44,17 @@ module Geo
end end
def log_error(message, error) def log_error(message, error)
Gitlab::Geo::Logger.error( Gitlab::Geo::Logger.error({
class: self.class.name, class: self.class.name,
message: message, message: message, error: error
error: error, }.merge(log_params))
end
def log_params
{
project_id: project.id, project_id: project.id,
project_path: project.full_path) project_path: project.full_path
}
end end
end end
end end
...@@ -14,13 +14,11 @@ module Geo ...@@ -14,13 +14,11 @@ module Geo
Geo::RepositoriesChangedEvent.new(geo_node: geo_node) Geo::RepositoriesChangedEvent.new(geo_node: geo_node)
end end
def log_error(message, error) def log_params
Gitlab::Geo::Logger.error( {
class: self.class.name,
message: message,
error: error,
geo_node_id: geo_node.id, geo_node_id: geo_node.id,
geo_node_url: geo_node.url) geo_node_url: geo_node.url
}
end end
end end
end 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