Skip to content

Log requests at log level INFO - #715

Merged
jgm merged 1 commit into
jgm:masterfrom
gsdlab:access-log
Oct 24, 2026
Merged

jgm merged 1 commit into
jgm:masterfrom
gsdlab:access-log

Conversation

@mantkiew

Copy link
Copy Markdown
Contributor

gitit configures the Happstack.Server.AccessLog.Combined logger with the log file and level (gitit.hs), but the server configuration passes logAccess = Nothing, so no requests are ever logged, whatever log-level says. This dates from the migration to happstack 6 (c0f4586), when Conf gained the logAccess field.

This uses happstack's default access logger (logAccess nullConf) when the log level is INFO or DEBUG, and keeps it off otherwise, so the default log-level: WARNING behaves as before. With log-level: INFO, each request is logged in combined log format, e.g.

127.0.0.1 - [24/Oct/2026:00:24:01 +0000] "GET /Help 1.1" 200 -1 "http://example.org/" "TestAgent/1.0"

Tested on gitit 0.16.0.2 with GHC 9.6.7.

🤖 Generated with Claude Code

gitit sets up the Happstack.Server.AccessLog.Combined logger with the log
file and level, but since the migration to happstack 6 it passed
logAccess = Nothing in the server configuration, so requests were never
logged. Use happstack's default access logger (combined log format) when
the log level is INFO or DEBUG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jgm
jgm merged commit 759959e into jgm:master Oct 24, 2026
5 checks passed
@mantkiew
mantkiew deleted the access-log branch October 25, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants