diff --git a/README.md b/README.md index 928aafe..d961598 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/main.go b/main.go index fafa4da..d7a6daa 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,6 @@ import ( "context" "embed" "flag" - "fmt" "io/fs" "log" "log/slog" @@ -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() @@ -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) } }