@@ -42,6 +42,7 @@ import qualified Data.Set as Set
4242import Data.Foldable (forM_)
4343import Data.Maybe (isJust, isNothing, catMaybes)
4444import Data.Typeable (Typeable)
45+import Debug.Trace
4546import Control.Category ((>>>))
4647import Control.Applicative ((<$>))
4748import Control.Monad (void, when)
@@ -222,6 +223,10 @@ startServiceProcesses node = do
222223 sendChan ch ()
223224 ]
224225
226+-- | Send a message to the GHC event log
227+logEvent :: String -> IO ()
228+logEvent = traceEventIO
229+
225230-- | Force-close a local node
226231--
227232-- TODO: for now we just close the associated endpoint
@@ -267,6 +272,10 @@ forkProcess node proc = modifyMVar (localState node) startProcess
267272 reason <- Exception.catch
268273 (runLocalProcess lproc proc >> return DiedNormal)
269274 (return . DiedException . (show :: SomeException -> String))
275+
276+ -- [Issue #104]
277+ logEvent (show reason)
278+
270279 -- [Unified: Table 4, rules termination and exiting]
271280 modifyMVar_ (localState node) (cleanupProcess pid)
272281 writeChan (localCtrlChan node) NCMsg