Documentation
¶
Index ¶
- func CheckFatal(location string, err error, logger log.Logger)
- func InitLogger(cfg *server.Config) log.Logger
- func NewDefaultLogger(l logging.Level, format logging.Format) log.Logger
- func WithContext(ctx context.Context, l kitlog.Logger) kitlog.Logger
- func WithSourceIPs(sourceIPs string, l kitlog.Logger) kitlog.Logger
- func WithTraceID(traceID string, l kitlog.Logger) kitlog.Logger
- func WithUserID(userID string, l kitlog.Logger) kitlog.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckFatal ¶
CheckFatal prints an error and exits with error code 1 if err is non-nil
func InitLogger ¶
InitLogger initialises the global gokit logger (util_log.Logger) and overrides the default logger for the server.
func NewDefaultLogger ¶
NewDefaultLogger creates a new gokit logger with the configured level and format
func WithContext ¶
WithContext returns a 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)
func WithSourceIPs ¶
WithSourceIPs returns a Logger that has information about the source IPs in its details.
func WithTraceID ¶
WithTraceID returns a Logger that has information about the traceID in its details.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.