title: How to find an appropriate event in Magento?
body: <p>Sometimes when looking for a convenient event to hook I do a bit of exploratory programming...</p>
  
  <ul>
  <li><p>Modify <code>Mage::dispatchEvent</code> with this extra line:</p>
  
  <pre><code>Mage::log($name.'('.implode(',', array_keys($data)).')');
  </code></pre></li>
  <li><p>Mark a start point which I know I cannot catch any sooner:</p>
  
  <pre><code>Mage::log(__METHOD__.'::START');
  </code></pre></li>
  <li><p>Mark an end point which I don't want to catch any later:</p>
  
  <pre><code>Mage::log(__METHOD__.'::STOP');
  </code></pre></li>
  <li><p>Watch the log and step through the site (eg. order submission, whatever is being investigated)</p>
  
  <pre><code>tailf var/log/system.log
  </code></pre></li>
  </ul>
  
  <p>This gives me a screen full of boring data and the names of objects being passed. Other than the <code>START</code> and <code>STOP</code> I'm usually not looking for anything specific enough to grep for it and I have to rely on my experience to identify possible bootstrap points. For example when placing orders I know there is often a 'quote' somewhere, or it is possible to get a reference to the order through a 'payment' object, or vice-versa.</p>
  
  <p>Then I have to remember to remove my markers (not that hard when using any sort of versioning).</p>
  
  <p>What methods do you use to find events? Can you do it without modifying core code?</p>