Skip to content

Commit

Permalink
export global logger (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyang0 authored Jun 13, 2024
1 parent 06bcc1c commit dff4594
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ func SetupLog(ctx context.Context, cfg *types.ServerLogConfig, dsn string) error
return nil
}

// GetGlobalLogger returns global logger
func GetGlobalLogger() *zerolog.Logger {
return &globalLogger
}

// Fatalf forwards to sentry
func Fatalf(ctx context.Context, err error, format string, args ...any) {
fatalf(ctx, err, format, nil, args...)
Expand Down

0 comments on commit dff4594

Please sign in to comment.