Hi Can anyone let me know the best way to perform logging exception in Umbraco 8 from surface controller. I tried below code and it is throwing an exception "Object reference not set to an instance of an object."
using Umbraco.Core.Logging;
Logger.Error<ErrorController>("Unable to locate url :: {url}", Request.UrlReferrer.AbsolutePath);
Logging from surface controller.
Hi Can anyone let me know the best way to perform logging exception in Umbraco 8 from surface controller. I tried below code and it is throwing an exception "Object reference not set to an instance of an object."
Hi Nagarjun
It is probably your
Request.UrlReferrer
that is null, so try checking for null on that first.thanks Soren. it worked.
is working on a reply...