From ecd2ea45aaf03d9b2a6a0e1e361b822f158d34d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Garcia?= Date: Sun, 16 Jul 2023 22:16:54 -0300 Subject: [PATCH] Improve log injection example --- examples/logging_queries/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/logging_queries/main.go b/examples/logging_queries/main.go index 629f156..d801f97 100644 --- a/examples/logging_queries/main.go +++ b/examples/logging_queries/main.go @@ -94,4 +94,8 @@ func main() { if err != nil { panic(err.Error()) } + + // Here we are provoking an error, so we can see an error on the log: + _ = db.QueryOne(ctx, &alison, "not a valid query", "someFakeParams") + // This logs: {"query":"not a valid query","params":["someFakeParams"],"error":"error running query: near \"not\": syntax error"} }