Commit ffd55318 authored by Nick Thomas's avatar Nick Thomas

Merge branch 'sh-fix-nonatomic-puts' into 'master'

Fix newlines not appearing between new log entries

Closes gitlab-com/gl-infra/infrastructure#5017

See merge request gitlab-org/gitlab-shell!242
parents 181b9b09 95e29278
......@@ -68,9 +68,10 @@ class GitlabLogger
case log_format
when 'json'
log_file.puts format_json(data)
# Don't use IO#puts because of https://bugs.ruby-lang.org/issues/14042
log_file.print("#{format_json(data)}\n")
else
log_file.puts format_text(data)
log_file.print("#{format_text(data)}\n")
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