Skip to content

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

@negatratoron

Description

@negatratoron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions