Demonstrates Perfect's HTTP Request Logging
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Perfect HTTP Request Logging Example

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

Perfect HTTP Request Logging Demonstration

This project is a simple demonstration of running an HTTP server with HTTP Request logging.

See the documentation for more detailed description of the Perfect Logging functionality.

Compatibility with Swift

The master branch of this project currently compiles with Xcode 8.1 or the Swift 3.0.1 toolchain on Ubuntu.

Building & Running

The following will clone and build an empty starter project and launch the server on port 8181.

git clone
cd Perfect-HTTPRequestLogging
swift build

You should see the following output:

[INFO] Starting HTTP server  on

When visiting http://localhost:8181 in a browser you will see lines like the following flowing into the console:

[INFO] [/NzcfGnz8-1] 2016-12-21 13:57:58 GMT-05:00 "GET / HTTP/1.1" from - 200 67B in 0ms
[INFO] [/NzcfGnz8-2] 2016-12-21 13:58:05 GMT-05:00 "GET /hello?world= HTTP/1.1" from - 200 67B in 0ms
[INFO] [/NzcfGnz8-3] 2016-12-21 13:58:18 GMT-05:00 "GET /hello?world=somethings HTTP/1.1" from - 200 67B in 0ms

To view the generated log file on disk, open (or tail) the customHTTPLogFile.log.


To run the project in Xcode, navigate to the directory in terminal and execute:

swift generate xcode-proj

Then open the generated project, select the executable scheme, edit the scheme and change the current working directory to the project's directory (so you can see the generated log file more easily). Then Run the project.


We are transitioning to using JIRA for all bugs and support related issues, therefore the GitHub issues has been disabled.

If you find a mistake, bug, or any other helpful suggestion you'd like to make on the docs please head over to and raise it.

A comprehensive list of open issues can be found at

Further Information

For more information on the Perfect project, please visit