diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-09 08:42:21 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-09 08:42:21 -0600 |
commit | 33648cc286e812a8603743c29e96830de3b4acb8 (patch) | |
tree | 2253b0c71035f866fb14e6692baf5587b1925fb4 /internal | |
parent | 195bdb565e9cb46e8d88ee364dcfc96a65a7159a (diff) |
log stderr on failed CGIs
Diffstat (limited to 'internal')
-rw-r--r-- | internal/server.go | 8 |
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, |