A previous blog covered how to use Field Medic to capture event logs on Windows Phone. This is only half of the story though: something needs to generate those events in the first place. This is where EventSource comes into play. It enables quickly adding performance events (markers for operation beginning and end, etc.) and unstructured traces (aka printf) to .NET apps:
EventSource does so with fairly little supporting code:
Field Medic supports capturing events generated by EventSource using typical WPRP config files, with one caveat: the event provider name must be prefixed by ‘*’.