I would avoid adding an event reciever in this way. You only need to add the eventreceive one time for the list anyways.
Why not use a delegate control, that runs with elevated priv's to record the things you want to capture?
BTW, you should not use SPContext inside of the SPSecurity.RunWithElevatedPrivileges.
string SiteUrl = SPContext.Current.Site.Url;
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(SiteUrl)
{
using (SPWeb web = site.OpenWeb())
{
// record your info, but do not attach the event receiver to the list here... do that in a feature, etc.
SPList leftBarList = web.Lists["YourListTitle"];
...
...
}
}
});
-Dan Keeling
Blog (http://dankeeling.blogspot.com/) or Follow me on Twitter @DanKeeling