0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00
Small, fast, modern HTTP server for Erlang/OTP.
Find a file
Loïc Hoguin a76c32db5e
Introduce undocumented option logger
This commit reworks the logging that Cowboy does via
error_logger to make the module that will do the actual
logging configurable.

The logger module interface must be the same as logger
and lager: a separate function per log level with the
same log levels they support.

The default behavior remains to call error_logger,
although some messages were downgraded to warnings
instead of errors. Since error_logger only supports
three different log levels, some messages may get
downgraded/upgraded depending on what the original
log level was to make them compatible with error_logger.

The {log, Level, Format, Args} command was also
added to stream handlers. Stream handlers should
use this command to log messages because it allows
writing a stream handler to intercept some of those
messages and extract information or block them as
necessary.

The logger option only applies to Cowboy itself,
not to the messages Ranch logs, so more work remains
to be done in that area.
2018-06-28 17:10:18 +02:00
doc/src Introduce undocumented option logger 2018-06-28 17:10:18 +02:00
ebin Move cowboy_iolists to Cowlib as cow_iolists 2018-05-07 15:33:11 +02:00
examples Use cowboy_req:stream_events in the eventsource example 2018-06-27 13:50:37 +02:00
src Introduce undocumented option logger 2018-06-28 17:10:18 +02:00
test Add test cases for cowboy_req:stream_events 2018-06-27 13:40:11 +02:00
.gitattributes Convert the documentation to Asciidoc 2016-01-14 13:37:20 +01:00
.gitignore gitignore: add examples/ dependency files 2016-05-25 12:54:12 +02:00
CONTRIBUTING.asciidoc Update CONTRIBUTING 2015-11-16 18:55:53 +01:00
erlang.mk Update Erlang.mk 2018-05-22 17:48:34 +02:00
LICENSE Welcome to 2017 2017-01-02 19:36:36 +01:00
Makefile Don't fail when copying erl_make_certs 2018-05-23 17:07:18 +02:00
plugins.mk Allow passing options to sub protocols 2017-02-18 18:26:20 +01:00
README.asciidoc update doc 2018-04-05 20:12:18 +02:00
rebar.config Update erlang.mk and rebar.config 2018-05-16 12:28:55 +02:00

= Cowboy

Cowboy is a small, fast and modern HTTP server for Erlang/OTP.

== Goals

Cowboy aims to provide a *complete* HTTP stack in a *small* code base.
It is optimized for *low latency* and *low memory usage*, in part
because it uses *binary strings*.

Cowboy provides *routing* capabilities, selectively dispatching requests
to handlers written in Erlang.

Because it uses Ranch for managing connections, Cowboy can easily be
*embedded* in any other application.

Cowboy is *clean* and *well tested* Erlang code.

== Online documentation

* https://ninenines.eu/docs/en/cowboy/2.3/guide[User guide]
* https://ninenines.eu/docs/en/cowboy/2.3/manual[Function reference]

== Offline documentation

* While still online, run `make docs`
* User guide available in `doc/` in PDF and HTML formats
* Function reference man pages available in `doc/man3/` and `doc/man7/`
* Run `make install-docs` to install man pages on your system
* Full documentation in Asciidoc available in `doc/src/`
* Examples available in `examples/`

== Getting help

* Official IRC Channel: #ninenines on irc.freenode.net
* https://github.com/ninenines/cowboy/issues[Issues tracker]
* https://ninenines.eu/services[Commercial Support]