Skip to content

Commit

Permalink
fix: stop errors creating a logger from logging the error with itself
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h committed Apr 14, 2023
1 parent f2914fc commit 099cd06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/templ/lspcmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package lspcmd

import (
"context"
"fmt"
"net/http"
"os"
"os/signal"
Expand Down Expand Up @@ -63,7 +64,7 @@ func run(ctx context.Context, args Arguments) (err error) {
}
log, err = cfg.Build()
if err != nil {
log.Error("failed to create logger: %v\n", zap.Error(err))
_, _ = fmt.Printf("failed to create logger: %v\n", err)
os.Exit(1)
}
}
Expand Down

0 comments on commit 099cd06

Please sign in to comment.