Skip to content

Commit

Permalink
Remove last printfs - replace with slog
Browse files Browse the repository at this point in the history
  • Loading branch information
fingon committed Dec 5, 2024
1 parent 0cb6a34 commit 989be41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ local Lixie instance which probably does not exist.

- Properly vendor static resources (bootstrap CSS, htmx JS)

- identify better logging pattern than printf :p

## Prettiness

- favicon
Expand Down
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"context"
"embed"
"flag"
"fmt"
"io/fs"
"log"
"log/slog"
Expand Down Expand Up @@ -160,7 +159,7 @@ func run(
shutdownCtx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
if err := httpServer.Shutdown(shutdownCtx); err != nil {
fmt.Fprintf(os.Stderr, "error shutting down http server: %s\n", err)
slog.Error("error shutting down http server", "err", err)
}
}()
wg.Wait()
Expand All @@ -171,7 +170,7 @@ func main() {
ctx := context.Background()
err := run(ctx, os.Args)
if err != nil {
fmt.Fprintf(os.Stderr, "%s\n", err.Error())
slog.Error("run resulted in error", "err", err)
os.Exit(1)
}
}

0 comments on commit 989be41

Please sign in to comment.