I typically do my error logging like this:
Sitecore.Diagnostics.Log.Error("My Error Message Here", ex, this);
But, that same syntax does not work for inside a Static class since this
is not valid in a static property, static method, or static field initializer.
I see from the IntelliSense that my other options would be string loggerName
or Type ownerType
. But, I'm not sure exactly what these options mean.
What is the correct way to log an error inside a static class?