You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
(notHappstack.Server.Logging
, surprisingly) further provides the type of access logging functions and explains whatlogMAccess
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.
The text was updated successfully, but these errors were encountered: