summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-09 08:42:21 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-09 08:42:21 -0600
commit33648cc286e812a8603743c29e96830de3b4acb8 (patch)
tree2253b0c71035f866fb14e6692baf5587b1925fb4 /internal
parent195bdb565e9cb46e8d88ee364dcfc96a65a7159a (diff)
log stderr on failed CGIs
Diffstat (limited to 'internal')
-rw-r--r--internal/server.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/server.go b/internal/server.go
index f2b3485..1ae594b 100644
--- a/internal/server.go
+++ b/internal/server.go
@@ -5,6 +5,8 @@ import (
"net"
"strings"
"sync"
+
+ "tildegit.org/tjp/sliderule/logging"
)
type logger interface {
@@ -40,6 +42,12 @@ func NewServer(
networkAddr := listener.Addr()
ctx, cancel := context.WithCancel(ctx)
+ debuglog, infolog, warnlog, errlog := logging.DefaultLoggers()
+ ctx = context.WithValue(ctx, "debuglog", debuglog)
+ ctx = context.WithValue(ctx, "infolog", infolog)
+ ctx = context.WithValue(ctx, "warnlog", warnlog)
+ ctx = context.WithValue(ctx, "errlog", errlog)
+
return Server{
Ctx: ctx,
Cancel: cancel,