gitlab.com/gitlab-org/labkit@v1.21.0/log/doc.go (about)

     1  /*
     2  Package log provides sensible logging defaults for Labkit.
     3  
     4  Labkit uses Logrus for logging.
     5  
     6  Applications that use Labkit should rely directly on Labkit.
     7  
     8  This package provides some utility methods for working with Labkit, including:
     9  
    10  1. Initialize Logrus in a consistent manner
    11  1. Using GitLab's defaults with logrus
    12  1. Passing correlation-ids between contexts and logrus
    13  
    14  For backward compatibility reasons, the log timestamp format defaults to time.RFC3339, as done by Logrus. Additionally,
    15  for millisecond precision timestamps, it is possible to opt in for using ISO8601. At present this can be done by setting
    16  the `GITLAB_ISO8601_LOG_TIMESTAMP` environment variable to any value. ISO8601 will become the default and only format in
    17  the next major release.
    18  
    19  Please review the examples for more details of how to use this package.
    20  */
    21  package log