Skip to content

Commit 79caa9e

Browse files
author
root
committed
Fix Hook logs output
1 parent 54662d8 commit 79caa9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: contrib/hooks/post-receive/lib/git_hosting_post_receive.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def exec
2626
def notify_redmine
2727
logger.info('')
2828
logger.info("Notifying Redmine about changes to this repository : '#{git_config.repository_name}' ...")
29-
logger.info('')
3029

3130
opts = {}
3231
opts[:params] = http_post_data
@@ -36,7 +35,9 @@ def notify_redmine
3635
http.request(request) do |response|
3736
if response.code.to_i == 200
3837
response.read_body do |body_frag|
39-
logger.info(body_frag)
38+
body_frag.split("\n").each do |line|
39+
logger.info(line)
40+
end
4041
end
4142
else
4243
logger.error(" - Error while notifying Redmine ! (status code: #{response.code})")

0 commit comments

Comments
 (0)