Code Monkey home page Code Monkey logo

perfect-httprequestlogging's Introduction

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 https://github.com/PerfectExamples/Perfect-HTTPRequestLogging.git
cd Perfect-HTTPRequestLogging
swift build
.build/debug/Perfect-HTTPRequestLogging

You should see the following output:

[INFO] Starting HTTP server  on 0.0.0.0:8181

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 127.0.0.1 - 200 67B in 0ms
[INFO] [/NzcfGnz8-2] 2016-12-21 13:58:05 GMT-05:00 "GET /hello?world= HTTP/1.1" from 127.0.0.1 - 200 67B in 0ms
[INFO] [/NzcfGnz8-3] 2016-12-21 13:58:18 GMT-05:00 "GET /hello?world=somethings HTTP/1.1" from 127.0.0.1 - 200 67B in 0ms

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

Xcode

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.

Issues

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 http://jira.perfect.org:8080/servicedesk/customer/portal/1 and raise it.

A comprehensive list of open issues can be found at http://jira.perfect.org:8080/projects/ISS/issues

Further Information

For more information on the Perfect project, please visit perfect.org.

perfect-httprequestlogging's People

Contributors

iamjono avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

elixman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.