2014-12-18 09:25:33 +01:00
|
|
|
.. _-logRequestResult-:
|
|
|
|
|
|
|
|
|
|
logRequestResult
|
2015-05-11 23:05:18 +02:00
|
|
|
================
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
Signature
|
|
|
|
|
---------
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
def logRequestResult(marker: String)(implicit log: LoggingContext): Directive0
|
|
|
|
|
def logRequestResult(marker: String, level: LogLevel)(implicit log: LoggingContext): Directive0
|
2014-12-22 16:18:26 +01:00
|
|
|
def logRequestResult(show: HttpRequest => HttpResponsePart => Option[LogEntry])
|
2014-12-18 09:25:33 +01:00
|
|
|
(implicit log: LoggingContext): Directive0
|
2014-12-22 16:18:26 +01:00
|
|
|
def logRequestResult(show: HttpRequest => Any => Option[LogEntry])(implicit log: LoggingContext): Directive0
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
The signature shown is simplified, the real signature uses magnets. [1]_
|
|
|
|
|
|
|
|
|
|
.. [1] See `The Magnet Pattern`_ for an explanation of magnet-based overloading.
|
2015-05-21 13:14:54 +02:00
|
|
|
.. _`The Magnet Pattern`: http://spray.io/blog/2012-12-13-the-magnet-pattern/
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
-----------
|
2015-10-09 15:19:36 +02:00
|
|
|
Logs both, the request and the response.
|
|
|
|
|
|
|
|
|
|
This directive is a combination of :ref:`-logRequest-` and :ref:`-logResult-`.
|
2014-12-18 09:25:33 +01:00
|
|
|
|
2015-10-09 15:19:36 +02:00
|
|
|
See :ref:`-logRequest-` for the general description how these directives work.
|
2014-12-18 09:25:33 +01:00
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
-------
|
|
|
|
|
|
2015-05-11 23:05:18 +02:00
|
|
|
.. includecode2:: ../../../../code/docs/http/scaladsl/server/directives/DebuggingDirectivesExamplesSpec.scala
|
2014-12-18 09:25:33 +01:00
|
|
|
:snippet: logRequestResult
|