Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export the access log name, "Happstack.Server.AccessLog.Combined" #34

Open
negatratoron opened this issue Nov 6, 2017 · 1 comment
Open

Comments

@negatratoron
Copy link
Contributor

I just had to set up access logging on a Happstack application, and have one comment.

First things first - searching the crash course for the words "log" and "access" quickly shows how to provide a logging function, and then the hackage page under Happstack.Server.Types (not Happstack.Server.Logging, surprisingly) further provides the type of access logging functions and explains what logMAccess does.

The question was, how to configure the server to output access logs to a file instead of to stderr. As this post mentions, you can set the root logger's level to INFO, and also make it log to a file, but as it also mentions, that will also affect all other loggers that are children of the root logger, but does not provide the name of Happstack's logger. I had to search the Happstack source code to get the name "Happstack.Server.AccessLog.Combined" used by logMAccess. It would be nice if that were exported so that I wouldn't have to search the source code, and so that it couldn't possibly unexpectedly break if the string changes.

@stepcut
Copy link
Member

stepcut commented Nov 14, 2017

This sounds like a reasonable request

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

No branches or pull requests

2 participants