git.iko.soy/distributed-process
on master help sign in
document 'trace' primitive for use by users
commit537732716470de0f08151243f0bdab155dd12d4b authorTim Watson <tim@rabbitmq.com> dateFri 25 Jan 2013, 03:31 (14 years ago) parentb49566a
1 file changed+7
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+7
distributed-process/src/Control/Distributed/Process/Internal/Primitives.hs+7
@@ -899,6 +899,13 @@ reconnectPort them = do
899899-- Debugging/Tracing --
900900--------------------------------------------------------------------------------
901901
902+-- | Send a message to the internal (system) trace facility. If tracing is
903+-- enabled, this will create a custom trace event in the event log. Specifically,
904+-- the environment variable @DISTRIBUTED_PROCESS_TRACE_FILE@ is set to a valid
905+-- path, then trace output will be written to that file. Otherwise, if the GHC
906+-- eventlog is enabled (i.e., you've compiled with @-eventlog@ set) and the
907+-- relevant @+RTS@ options given, then the message will be sent to the event log.
908+-- If neither facility is in use then trace messages will be silently dropped.
902909trace :: String -> Process ()
903910trace s = do
904911 node <- processNode <$> ask