0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Document the log stream handler command

This commit is contained in:
Loïc Hoguin 2019-10-07 11:57:57 +02:00
parent 53bc54a860
commit e25fb19bab
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -245,6 +245,18 @@ because of an internal error. An `error_response` command
may be sent before that to advertise to the client why the may be sent before that to advertise to the client why the
stream is dropped. stream is dropped.
=== log
Log a message.
[source,erlang]
----
{log, logger:level(), io:format(), list()}
----
This command can be used to log a message using the
configured `logger` module.
== Predefined events == Predefined events
Cowboy will forward all messages sent to the stream to Cowboy will forward all messages sent to the stream to
@ -365,9 +377,10 @@ tuple.
== Changelog == Changelog
* *2.6*: The data command can now contain a sendfile tuple. * *2.7*: The `log` command was introduced.
* *2.6*: The `data` command can now contain a sendfile tuple.
* *2.6*: The `{stop, {exit, any()}, HumanReadable}` terminate reason was added. * *2.6*: The `{stop, {exit, any()}, HumanReadable}` terminate reason was added.
* *2.2*: The trailers command was introduced. * *2.2*: The `trailers` command was introduced.
* *2.0*: Module introduced. * *2.0*: Module introduced.
== See also == See also