title: How to log workflow foundation activities
body: <p>I have a task to add logging functionality to the existing workflow based solution. There is a layered architecture : BusinessLayer->AgentLayer->StoreLayer. At the business layer there is a xaml activity which consists from a one or more agent activities. Agent activity consists from one or more store activities. Agent and Store activities are inherited from CodeActivity.</p>
  
  <p>Activities are executed by </p>
  
  <pre><code>WorkflowInvoker.Invoke(activity);
  </code></pre>
  
  <p>My task is to log the execution of each activity. The log output. should be e.g.</p>
  
  <pre><code>BusinessActivity1 has been started at 11:00 8.2.2012
  AgentActivity1 has been started at 11:01 8.2.2012
  StoreActivity1 has been started at 11:02 8.2.2012
  StoreActivity1 has been ended at 11:03 8.2.2012
  AgentActivity1 has been ended at 11:04 8.2.2012
  BusinessActivity1 has been ended at 11:05 8.2.2012
  </code></pre>
  
  <p>So my question is what is the best practise to log something like this. I don't want to write the LogMessage to the each activity. I prefer the unified solution. Is there exists any clever solutions?</p>
  
  <p>thanks</p>