https://github.com/puzza007/al
Apache Logger Onresponse Function For Cowboy
https://github.com/puzza007/al
Last synced: 3 months ago
JSON representation
Apache Logger Onresponse Function For Cowboy
- Host: GitHub
- URL: https://github.com/puzza007/al
- Owner: puzza007
- Created: 2014-08-19T12:50:00.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-19T12:57:26.000Z (almost 12 years ago)
- Last Synced: 2024-12-31T20:16:22.210Z (over 1 year ago)
- Language: Erlang
- Size: 141 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
al
==
Apache Logger Onresponse Function For Cowboy
```erlang
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{compress, true},
{env, [{dispatch, Dispatch}]},
{onresponse, fun al:onresponse/4}
]),
```
Log lines look like
```
=INFO REPORT==== 19-Aug-2014::14:44:32 ===
127.0.0.1 - - [2014-08-19T12:44:32Z] "GET /flange?bar=foo HTTP/1.1 404 0
=INFO REPORT==== 19-Aug-2014::14:45:49 ===
127.0.0.1 - - [2014-08-19T12:45:49Z] "GET / HTTP/1.1 200 510
```