Skip to content
Snippets Groups Projects
Commit c84675ee authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

satellites logs

parent 7121a58e
No related branches found
No related tags found
2 merge requests!2940Expanding repos and hooks paths in settings,!2770Capistrano deploy
module Gitlab
module Satellite
class Logger < Gitlab::Logger
def self.file_name
'satellites.log'
end
def format_message(severity, timestamp, progname, msg)
"#{timestamp.to_s(:long)}: #{msg}\n"
end
end
end
end
Loading
Loading
@@ -13,6 +13,10 @@ module Gitlab
@project = project
end
 
def log message
Gitlab::Satellite::Logger.error(message)
end
def raise_no_satellite
raise SatelliteNotExistError.new("Satellite doesn't exist")
end
Loading
Loading
@@ -29,10 +33,13 @@ module Gitlab
output, status = popen("git clone #{project.url_to_repo} #{path}",
Gitlab.config.satellites.path)
 
log("PID: #{project.id}: git clone #{project.url_to_repo} #{path}")
log("PID: #{project.id}: -> #{output}")
if status.zero?
true
else
Gitlab::GitLogger.error("Failed to create satellite for #{project.name_with_namespace}")
log("Failed to create satellite for #{project.name_with_namespace}")
false
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment