Documentation ¶
Index ¶
- Variables
- func CheckFatal(location string, err error, logger log.Logger)
- func InitLogger(cfg *server.Config, reg prometheus.Registerer)
- func WarnExperimentalUse(feature string, logger log.Logger)
- func WithContext(ctx context.Context, l log.Logger) log.Logger
- func WithUserID(userID string, l log.Logger) log.Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Logger is a shared go-kit logger. // TODO: Change all components to take a non-global logger via their constructors. // Prefer accepting a non-global logger as an argument. Logger = log.NewNopLogger() )
Functions ¶
func CheckFatal ¶
CheckFatal prints an error and exits with error code 1 if err is non-nil.
func InitLogger ¶
func InitLogger(cfg *server.Config, reg prometheus.Registerer)
InitLogger initialises the global gokit logger (util_log.Logger) and overrides the default logger for the server.
func WarnExperimentalUse ¶
WarnExperimentalUse logs a warning and increments the experimental features metric.
func WithContext ¶
WithContext returns a log.Logger that has information about the current user in its details.
e.g.
log := util.WithContext(ctx) log.Errorf("Could not chunk chunks: %v", err)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.