Forum | Documentation | Website | Blog

Skip to content
  • Tomasz Maczukin's avatar
    Remove unnecessary log alias for logrus inport · d9e9d81c
    Tomasz Maczukin authored
    Some time ago [we had a discussion](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/934#note_91891281)
    about why we're aliasing some of the imports of `github.com/sirupsen/logrus`
    package with a `log` alias.
    
    At that moment we've been doing that in 17 from 68 cases when logrus
    was imported in Runners codebase.
    
    The conclusion was this aliasing is unnecessary, because:
    - we relay on logrus interface so much that moving to another logging
      library will be not so simple as switching the import name;
    - we're totally not consistent in the alias usage which makes the code
      even more messy.
    
    Three GitLab Runner maintainers agreeded hat there is no reason to use
    the aliasing and that we should just use `logrus` everywhere.
    
    But no action was don since then. The cleanup was left for a future.
    
    Unfortunately, because GitLab Runner is one of our biggest projects in
    Go, for some people it becomes a source of suggestions of how certain
    things should be handle...
    d9e9d81c