You've already forked Go-Template
enhance linting rules and update HTTP status codes in responses
Some checks failed
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Failing after 1m11s
Some checks failed
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Failing after 1m11s
This commit is contained in:
@@ -22,7 +22,7 @@ type Logger struct {
|
||||
logger *log.Logger
|
||||
}
|
||||
|
||||
func FromContext(ctx context.Context) Interface {
|
||||
func FromContext(ctx context.Context) *Logger {
|
||||
logger, ok := ctx.Value(contextKey).(*Logger)
|
||||
if !ok {
|
||||
return nil
|
||||
@@ -31,7 +31,7 @@ func FromContext(ctx context.Context) Interface {
|
||||
return logger
|
||||
}
|
||||
|
||||
func NewLogger(level log.Level) Interface {
|
||||
func NewLogger(level log.Level) *Logger {
|
||||
l := log.New()
|
||||
l.SetFormatter(&log.JSONFormatter{})
|
||||
l.SetLevel(level)
|
||||
|
||||
Reference in New Issue
Block a user