aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-10-07 11:57:57 +0200
committerLoïc Hoguin <[email protected]>2019-10-07 11:58:45 +0200
commite25fb19bab02ba7fee68d5188d340311fffc3ce3 (patch)
tree956d3494593027fa202791020c7108418a745fc3 /doc
parent53bc54a860c7bdc089d637fa96c91f8d6f3a92c3 (diff)
downloadcowboy-e25fb19bab02ba7fee68d5188d340311fffc3ce3.tar.gz
cowboy-e25fb19bab02ba7fee68d5188d340311fffc3ce3.tar.bz2
cowboy-e25fb19bab02ba7fee68d5188d340311fffc3ce3.zip
Document the log stream handler command
Diffstat (limited to 'doc')
-rw-r--r--doc/src/manual/cowboy_stream.asciidoc17
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/src/manual/cowboy_stream.asciidoc b/doc/src/manual/cowboy_stream.asciidoc
index 6eff028..3b47d42 100644
--- a/doc/src/manual/cowboy_stream.asciidoc
+++ b/doc/src/manual/cowboy_stream.asciidoc
@@ -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
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
Cowboy will forward all messages sent to the stream to
@@ -365,9 +377,10 @@ tuple.
== 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.2*: The trailers command was introduced.
+* *2.2*: The `trailers` command was introduced.
* *2.0*: Module introduced.
== See also