Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • G gitlab-shell
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedinexedi
  • gitlab-shell
  • Repository
You need to sign in or sign up before continuing.
  • gitlab-shell
  • lib
  • gitlab_logger.rb
Find file BlameHistoryPermalink
  • Stan Hu's avatar
    Fix newlines not appearing between new log entries · 95e29278
    Stan Hu authored Sep 11, 2018
    In https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5017, we
    observed that lots of log messages were being dropped by Fluentd due to
    missing newlines.
    
    This occurs because there is a bug in Ruby where IO#puts calls write() twice:
    once to write the main text, and another to write the newline
    (https://bugs.ruby-lang.org/issues/14042). In a highly concurrent environment
    like GitLab.com, this can lead to interleaved newlines.
    
    A workaround is to use `IO#print` and append the newline ourselves.
    
    Closes https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5017
    95e29278
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7