summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-07-11 15:56:36 +0200
committerfranck cuny <franck@lumberjaph.net>2011-07-26 13:21:01 +0200
commitbfdd052bda75e831c0135389f463fd2b20102ee3 (patch)
tree2f5607f80a4480be3b30286847037908eda02eca
parentcleanup test (diff)
downloadnet-http-spore-bfdd052bda75e831c0135389f463fd2b20102ee3.tar.gz
add documentation for tracing
Signed-off-by: franck cuny <franck@lumberjaph.net>
-rw-r--r--lib/Net/HTTP/Spore.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Spore.pm b/lib/Net/HTTP/Spore.pm
index 520b356..7bbd612 100644
--- a/lib/Net/HTTP/Spore.pm
+++ b/lib/Net/HTTP/Spore.pm
@@ -207,4 +207,22 @@ either be a file on disk or a remote URL.
 Create and return a L<Net::HTTP::Spore::Core> object, with methods
 generated from the specification string.
 
+=head2 TRACING
+
+L<Net::HTTP::Spore> provides a way to trace what's going on when doing a request.
+
+=head3 Enabling Trace
+
+You can enable tracing using the environment variable B<SPORE_TRACE>. You can also enable tracing at construct time by adding B<trace =E-<GT> 1> when calling B<new_from_spec>.
+
+=head3 Trace Output
+
+By default output will be directed to B<STDERR>. You can specify another default output:
+
+    SPORE_TRACE=1=log.txt
+
+or
+
+    ->new_from_spec('spec.json', trace => '1=log.txt');
+
 =back