Closed GoogleCodeExporter closed 8 years ago
This is by-design. The ErrorLog determines the ApplicationName and ignores
anything you have set for sake of consistency, correctness and isolation (where
the backend store is being shared by several applications). The
Error.ApplicationName property is settable primarily so that it can be
initialized when an error is rehydrated from the log. If you want override this
policy then subclass SqlErrorLog and override the Log method to use what was
supplied in the Error object.
Original comment by azizatif
on 1 Jul 2015 at 10:22
[deleted comment]
The only problem with that plan is that the public `Log` method calls into the
private sealed class `Commands.LogError`. So then I have to duplicate that code
as well. Ah well, should work, and I know this is a very, very edge usage case.
Thanks!
Original comment by dgfi...@gmail.com
on 2 Jul 2015 at 2:17
> So then I have to duplicate that code as well.
Thank God this is open source and so you *can* do that. ;)
I agree it's not ideal but fortunately you don't have to duplicate the whole
class except one method:
https://bitbucket.org/project-elmah/1x/src/3a71f9a4eeb57921662b5a5acc211fc4b0932
cae/src/Elmah/SqlErrorLog.cs?at=v1.2-sp2#cl-415
That method is not ever likely to change unless you tweak the stored procedure
interface. The rest is just plain old ADO.NET code.
Original comment by azizatif
on 2 Jul 2015 at 4:04
Original issue reported on code.google.com by
dgfi...@gmail.com
on 1 Jul 2015 at 10:01